Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[render-test] Fix render-test manifest confilicted local and member n…
Browse files Browse the repository at this point in the history
…ames (#15888)
  • Loading branch information
zmiao authored Nov 5, 2019
1 parent 4964f7e commit 1d49c23
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions render-test/manifest_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down

0 comments on commit 1d49c23

Please sign in to comment.