We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60ff702 commit 10453deCopy full SHA for 10453de
generator/internal/http_option_utils.cc
@@ -399,9 +399,9 @@ std::string FormatApiVersionFromPackageName(
399
std::string FormatApiVersionFromUrlPattern(std::string const& url_pattern,
400
std::string const& file_name) {
401
std::vector<std::string> parts = absl::StrSplit(url_pattern, '/');
402
- static std::regex const kRe{R"(v\d+)"};
+ static auto const* const kVersion = new std::regex{R"(v\d+)"};
403
for (auto const& part : parts) {
404
- if (std::regex_match(part, kRe)) {
+ if (std::regex_match(part, *kVersion)) {
405
return part;
406
}
407
0 commit comments