diff options
author | zmiao <miao.zhao@mapbox.com> | 2019-11-05 13:41:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-05 13:41:46 +0200 |
commit | 1d49c23b8558e8c24a51e7ba84525ddd06f231be (patch) | |
tree | 70b9c184d15da3fc7d5ac2d9b35bb04a950ec35c /render-test | |
parent | 4964f7ed0093597eb3b21d8af522d9b491c635fd (diff) | |
download | qtlocation-mapboxgl-1d49c23b8558e8c24a51e7ba84525ddd06f231be.tar.gz |
[render-test] Fix render-test manifest confilicted local and member names (#15888)
Diffstat (limited to 'render-test')
-rw-r--r-- | render-test/manifest_parser.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/render-test/manifest_parser.cpp b/render-test/manifest_parser.cpp index 3e56138e83..3f1f9f3866 100644 --- a/render-test/manifest_parser.cpp +++ b/render-test/manifest_parser.cpp @@ -46,8 +46,8 @@ void Manifest::doShuffle(uint32_t seed) { std::string Manifest::localizeURL(const std::string& url) const { static const std::regex regex{"local://"}; - if (auto vendorPath = getVendorPath(url, regex)) { - return *vendorPath; + if (auto path = getVendorPath(url, regex)) { + return *path; } return getIntegrationPath(url, "", regex).value_or(url); } @@ -131,16 +131,16 @@ void Manifest::localizeStyleURLs(mbgl::JSValue& root, mbgl::JSDocument& document mbgl::optional<std::string> Manifest::localizeLocalURL(const std::string& url, bool glyphsPath) const { static const std::regex regex{"local://"}; - if (auto vendorPath = getVendorPath(url, regex, glyphsPath)) { - return vendorPath; + if (auto path = getVendorPath(url, regex, glyphsPath)) { + return path; } return getIntegrationPath(url, "", regex, glyphsPath); } mbgl::optional<std::string> Manifest::localizeHttpURL(const std::string& url) const { static const std::regex regex{"http://localhost:2900"}; - if (auto vendorPath = getVendorPath(url, regex)) { - return vendorPath; + if (auto path = getVendorPath(url, regex)) { + return path; } return getIntegrationPath(url, "", regex); } @@ -157,8 +157,8 @@ mbgl::optional<std::string> Manifest::localizeMapboxFontsURL(const std::string& mbgl::optional<std::string> Manifest::localizeMapboxTilesURL(const std::string& url) const { static const std::regex regex{"mapbox://"}; - if (auto vendorPath = getVendorPath(url, regex)) { - return vendorPath; + if (auto path = getVendorPath(url, regex)) { + return path; } return getIntegrationPath(url, "tiles/", regex); } |