mirror of
https://github.com/vgough/encfs.git
synced 2024-11-25 01:13:12 +01:00
Correct performance warnings
This commit is contained in:
parent
707eddabf4
commit
00bd6d3c45
@ -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"
|
||||
)
|
||||
|
@ -465,7 +465,7 @@ bool saveConfig(ConfigType type, const string &rootDir,
|
||||
template <typename T>
|
||||
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<unsigned char> data) {
|
||||
const std::vector<unsigned char> &data) {
|
||||
string v = string("\n") + B64StandardEncode(data) + "\n";
|
||||
return addEl(doc, parent, name, v.c_str());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user