Attempt to fix build error on some platforms

See issue #1873.
This commit is contained in:
Martin Kleusberg
2019-05-03 17:59:11 +02:00
parent 16768d5474
commit d87f253940

View File

@@ -15,7 +15,7 @@ std::string escapeIdentifier(const std::string& id)
{
switch(customQuoting) {
case GraveAccents:
return '`' + std::regex_replace(id, std::regex("\\`"), "``") + '`';
return '`' + std::regex_replace(id, std::regex("\\`"), std::string("``")) + '`';
case SquareBrackets:
// There aren't any escaping possibilities for square brackets inside the identifier,
// so we rely on the user to not enter these characters when this kind of quoting is
@@ -26,7 +26,7 @@ std::string escapeIdentifier(const std::string& id)
// This may produce a 'control reaches end of non-void function' warning if the
// default branch is removed, even though we have covered all possibilities in the
// switch statement.
return '"' + std::regex_replace(id, std::regex("\\\""), "\"\"") + '"';
return '"' + std::regex_replace(id, std::regex("\\\""), std::string("\"\"")) + '"';
}
}