diff --git a/CMakeLists.txt b/CMakeLists.txt index f7e23e9..4f86379 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -180,6 +180,7 @@ if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 3.5) # Need 3.6 or abo ",-google-runtime-int" ",-google-runtime-references" ",-modernize-loop-convert" + ",-performance-inefficient-string-concatenation" ",-readability-inconsistent-declaration-parameter-name" ",-readability-named-parameter" ) diff --git a/encfs/FileUtils.cpp b/encfs/FileUtils.cpp index 58e91a9..35bc65b 100644 --- a/encfs/FileUtils.cpp +++ b/encfs/FileUtils.cpp @@ -465,7 +465,7 @@ bool saveConfig(ConfigType type, const string &rootDir, template tinyxml2::XMLElement *addEl(tinyxml2::XMLDocument &doc, tinyxml2::XMLNode *parent, const char *name, - T value) { + const T &value) { auto el = doc.NewElement(name); el->SetText(value); parent->InsertEndChild(el); @@ -475,7 +475,7 @@ tinyxml2::XMLElement *addEl(tinyxml2::XMLDocument &doc, template <> tinyxml2::XMLElement *addEl<>(tinyxml2::XMLDocument &doc, tinyxml2::XMLNode *parent, const char *name, - Interface iface) { + const Interface &iface) { auto el = doc.NewElement(name); auto n = doc.NewElement("name"); @@ -497,7 +497,7 @@ tinyxml2::XMLElement *addEl<>(tinyxml2::XMLDocument &doc, template <> tinyxml2::XMLElement *addEl<>(tinyxml2::XMLDocument &doc, tinyxml2::XMLNode *parent, const char *name, - std::vector data) { + const std::vector &data) { string v = string("\n") + B64StandardEncode(data) + "\n"; return addEl(doc, parent, name, v.c_str()); }