Make build on clang
And support clang-tidy rules. The changes are pretty minimal, and were
all done by the clang robot.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I29501aa56de1cd63cda233e06a07641458f89345
diff --git a/src/Utils.cpp b/src/Utils.cpp
index a097d06..e92897e 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -46,7 +46,9 @@
std::vector<fs::path>& foundPaths)
{
if (!fs::exists(dirPath))
+ {
return false;
+ }
std::regex search(matchString);
std::smatch match;
@@ -99,7 +101,7 @@
parser.populateSchema(schemaAdapter, schema);
valijson::Validator validator;
valijson::adapters::NlohmannJsonAdapter targetAdapter(input);
- if (!validator.validate(schema, targetAdapter, NULL))
+ if (!validator.validate(schema, targetAdapter, nullptr))
{
return false;
}
@@ -227,9 +229,9 @@
foundDevicePair.second);
return ret;
}
- else if (nextItemIdx > strPtr->size() ||
- std::find(mathChars.begin(), mathChars.end(),
- strPtr->at(nextItemIdx)) == mathChars.end())
+ if (nextItemIdx > strPtr->size() ||
+ std::find(mathChars.begin(), mathChars.end(),
+ strPtr->at(nextItemIdx)) == mathChars.end())
{
std::string val = std::visit(VariantToStringVisitor(),
foundDevicePair.second);