Fix .clang-tidy
camelLower is not a type, camelBack is.
Changes were made automatically with clang-tidy --fix-errors
To be able to apply changes automatically, the only way I've found that
works was to build the version of clang/clang-tidy that yocto has, and
run the fix script within bitbake -c devshell bmcweb. Unfortunately,
yocto has clang-tidy 11, which can apparently find a couple extra errors
in tests we already had enabled. As such, a couple of those are also
included.
Tested:
Ran clang-tidy-11 and got a clean result.
Signed-off-by: Ed Tanous <ed@tanous.net>
Change-Id: I9d1080b67f0342229c2f267160849445c065ca51
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index adc1c80..f22744b 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -143,7 +143,7 @@
}
contents = std::string_view(data, length);
// Only use the content after the "=" character.
- contents.remove_prefix(std::min(contents.find("=") + 1, contents.size()));
+ contents.remove_prefix(std::min(contents.find('=') + 1, contents.size()));
return ret;
}
@@ -319,7 +319,7 @@
// Convert the unique ID back to a timestamp to find the entry
std::string_view tsStr(entryID);
- auto underscorePos = tsStr.find("_");
+ auto underscorePos = tsStr.find('_');
if (underscorePos != tsStr.npos)
{
// Timestamp has an index