aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-09-27 15:31:09 +0200
committerEelco Dolstra <edolstra@gmail.com>2019-09-27 15:31:09 +0200
commit15b888c9a589e71a6e3b9bc2cfcb3679f90fbf70 (patch)
treeed88c3f951c4c019eedcd55a033b43fc4fabef1a /src
parent454e3a541a05a9b422ae5cd0911316f589f02506 (diff)
cmatch -> smatch
Diffstat (limited to 'src')
-rw-r--r--src/libexpr/flake/flakeref.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libexpr/flake/flakeref.cc b/src/libexpr/flake/flakeref.cc
index 364a98358..8e90e5989 100644
--- a/src/libexpr/flake/flakeref.cc
+++ b/src/libexpr/flake/flakeref.cc
@@ -88,8 +88,8 @@ FlakeRef::FlakeRef(const std::string & uri_, bool allowRelative)
return true;
};
- std::cmatch match;
- if (std::regex_match(uri.c_str(), match, flakeRegex)) {
+ std::smatch match;
+ if (std::regex_match(uri, match, flakeRegex)) {
IsId d;
d.id = match[1];
if (match[2].matched)
@@ -102,7 +102,7 @@ FlakeRef::FlakeRef(const std::string & uri_, bool allowRelative)
data = d;
}
- else if (std::regex_match(uri.c_str(), match, githubRegex)) {
+ else if (std::regex_match(uri, match, githubRegex)) {
IsGitHub d;
d.owner = match[1];
d.repo = match[2];
@@ -120,7 +120,7 @@ FlakeRef::FlakeRef(const std::string & uri_, bool allowRelative)
data = d;
}
- else if (std::regex_match(uri.c_str(), match, uriRegex)) {
+ else if (std::regex_match(uri, match, uriRegex)) {
auto & scheme = match[2];
if (scheme == "git" ||
scheme == "git+http" ||