From d87f25394018915954fc9b055838fca62072e435 Mon Sep 17 00:00:00 2001 From: Martin Kleusberg Date: Fri, 3 May 2019 17:59:11 +0200 Subject: [PATCH] Attempt to fix build error on some platforms See issue #1873. --- src/sql/ObjectIdentifier.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sql/ObjectIdentifier.cpp b/src/sql/ObjectIdentifier.cpp index 10a7b77f..cbe26055 100644 --- a/src/sql/ObjectIdentifier.cpp +++ b/src/sql/ObjectIdentifier.cpp @@ -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("\"\"")) + '"'; } }