fix bugprone-*

* bugprone-throw-keyword-missing
* bugprone-unhandled-self-assignment
* bugprone-suspicious-string-compare
* bugprone-reserved-identifier
* bugprone-narrowing-conversions
* bugprone-macro-parentheses
* bugprone-implicit-widening-of-multiplication-result
* bugprone-exception-escape
* bugprone-copy-constructor-init
This commit is contained in:
wmayer
2023-11-15 13:36:51 +01:00
parent c07c7c9fc9
commit 39337ea12e
23 changed files with 99 additions and 73 deletions

View File

@@ -754,7 +754,7 @@ std::vector<bool> ParameterGrp::GetBools(const char* sFilter) const
Name = StrX(pcTemp->getAttribute(XStr("Name").unicodeForm())).c_str();
// check on filter condition
if (!sFilter || Name.find(sFilter) != std::string::npos) {
if (strcmp(StrX(pcTemp->getAttribute(XStr("Value").unicodeForm())).c_str(), "1")) {
if (strcmp(StrX(pcTemp->getAttribute(XStr("Value").unicodeForm())).c_str(), "1") != 0) {
vrValues.push_back(false);
}
else {
@@ -781,7 +781,7 @@ std::vector<std::pair<std::string, bool>> ParameterGrp::GetBoolMap(const char* s
Name = StrX(pcTemp->getAttribute(XStr("Name").unicodeForm())).c_str();
// check on filter condition
if (!sFilter || Name.find(sFilter) != std::string::npos) {
if (strcmp(StrX(pcTemp->getAttribute(XStr("Value").unicodeForm())).c_str(), "1")) {
if (strcmp(StrX(pcTemp->getAttribute(XStr("Value").unicodeForm())).c_str(), "1") != 0) {
vrValues.emplace_back(Name, false);
}
else {