diff --git a/src/DynamicModel.cc b/src/DynamicModel.cc
index 9e80707225f50d6e658c0eb9b2b26e2077620ecf..601d9e331e435adfce8055daf7202080f7015a22 100644
--- a/src/DynamicModel.cc
+++ b/src/DynamicModel.cc
@@ -302,7 +302,7 @@ string
 DynamicModel::reform(const string& name1) const
 {
   string name = name1;
-  int pos = name.find(R"(\)", 0);
+  int pos = name.find('\\', 0);
   while (pos >= 0)
     {
       if (name.substr(pos + 1, 1) != R"(\)")
@@ -311,7 +311,7 @@ DynamicModel::reform(const string& name1) const
           pos++;
         }
       pos++;
-      pos = name.find(R"(\)", pos);
+      pos = name.find('\\', pos);
     }
   return name;
 }
@@ -573,12 +573,12 @@ DynamicModel::parseIncludeExcludeEquations(const string& inc_exc_option_value, b
           removeLeadingTrailingWhitespace(line);
           if (!line.empty())
             {
-              if (tags.empty() && line.find("=") != string::npos)
+              if (tags.empty() && line.find('=') != string::npos)
                 {
                   tagname_on_first_line = true;
                   tags += line + "(";
                 }
-              else if (line.find("'") != string::npos)
+              else if (line.find('\'') != string::npos)
                 tags += line + ",";
               else
                 tags += "'" + line + "',";
diff --git a/src/ModelTree.cc b/src/ModelTree.cc
index 885ee71742f3f3bce34c0fb6ee07ffdae87df78e..c81824d441791cbce318f095a93cc9a0318adbea 100644
--- a/src/ModelTree.cc
+++ b/src/ModelTree.cc
@@ -1187,7 +1187,7 @@ ModelTree::fixNestedParenthesis(ostringstream& output, map<string, string>& tmp_
           else
             varname = it->second;
           str.replace(first_open_paren, matching_paren - first_open_paren + 1, varname);
-          size_t insertLoc = str.find_last_of("\n", first_open_paren);
+          size_t insertLoc = str.find_last_of('\n', first_open_paren);
           str.insert(insertLoc + 1, repstr);
           hit_limit = false;
           i = -1;
diff --git a/src/ParsingDriver.cc b/src/ParsingDriver.cc
index ae2c74cfe74e62f04e1602e71faa73c74106eb66..972ce1fb9b55875b2f4b07b78257475493c2c26e 100644
--- a/src/ParsingDriver.cc
+++ b/src/ParsingDriver.cc
@@ -341,7 +341,7 @@ ParsingDriver::add_inf_constant()
 expr_t
 ParsingDriver::add_model_variable(const string& name)
 {
-  if (name.find(".") != string::npos)
+  if (name.find('.') != string::npos)
     error(name + " treated as a variable, but it contains a '.'");
 
   check_symbol_existence_in_model_block(name);
@@ -456,7 +456,7 @@ ParsingDriver::add_model_variable(int symb_id, int lag)
 expr_t
 ParsingDriver::add_expression_variable(const string& name)
 {
-  if (name.find(".") != string::npos)
+  if (name.find('.') != string::npos)
     error(name + " treated as a variable, but it contains a '.'");
 
   if (parsing_epilogue && !mod_file->symbol_table.exists(name))
diff --git a/src/Statement.cc b/src/Statement.cc
index e8d568f2ec2d0494b6f27cf74383b4b7f5e27402..42c9b1e4df607eea44f4bbae556e420d084c82fb 100644
--- a/src/Statement.cc
+++ b/src/Statement.cc
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2006-2022 Dynare Team
+ * Copyright © 2006-2023 Dynare Team
  *
  * This file is part of Dynare.
  *
@@ -168,7 +168,7 @@ void
 OptionsList::writeOutput(ostream& output, const string& option_group) const
 {
   // Initialize option_group as an empty struct iff the field does not exist!
-  if (size_t idx = option_group.find_last_of("."); idx != string::npos)
+  if (size_t idx = option_group.find_last_of('.'); idx != string::npos)
     {
       output << "if ~isfield(" << option_group.substr(0, idx) << ",'"
              << option_group.substr(idx + 1) << "')" << endl;