Skip to content
Snippets Groups Projects
Commit 17233e94 authored by Tom Fischer's avatar Tom Fischer
Browse files

[BL] Fix clang-tidy google-readability-braces-around-statements.

parent 6fd7282b
No related branches found
No related tags found
No related merge requests found
...@@ -75,11 +75,15 @@ std::string date2string(double ddate) ...@@ -75,11 +75,15 @@ std::string date2string(double ddate)
rest = rest % (y * 10000); rest = rest % (y * 10000);
auto m = static_cast<int>(std::floor(rest / 100.0)); auto m = static_cast<int>(std::floor(rest / 100.0));
if (m < 1 || m > 12) if (m < 1 || m > 12)
{
WARN("date2String(): month not in [1:12]."); WARN("date2String(): month not in [1:12].");
}
rest = rest % (m * 100); rest = rest % (m * 100);
int d = rest; int d = rest;
if (d < 1 || d > 31) if (d < 1 || d > 31)
{
WARN("date2String(): day not in [1:31]."); WARN("date2String(): day not in [1:31].");
}
std::string day = std::to_string(d); std::string day = std::to_string(d);
if (d < 10) if (d < 10)
...@@ -116,10 +120,14 @@ int xmlDate2int(const std::string &s) ...@@ -116,10 +120,14 @@ int xmlDate2int(const std::string &s)
{ {
int d = atoi(s.substr(8,2).c_str()); int d = atoi(s.substr(8,2).c_str());
if (d < 1 || d > 31) if (d < 1 || d > 31)
{
WARN("xmlDate2double(): day not in [1:31]."); WARN("xmlDate2double(): day not in [1:31].");
}
int m = atoi(s.substr(5,2).c_str()); int m = atoi(s.substr(5,2).c_str());
if (m < 1 || m > 12) if (m < 1 || m > 12)
{
WARN("xmlDate2double(): month not in [1:12]."); WARN("xmlDate2double(): month not in [1:12].");
}
int y = atoi(s.substr(0,4).c_str()); int y = atoi(s.substr(0,4).c_str());
return date2int(y, m, d); return date2int(y, m, d);
} }
......
...@@ -101,7 +101,9 @@ std::vector<T> readBinaryArray(std::string const& filename, std::size_t const n) ...@@ -101,7 +101,9 @@ std::vector<T> readBinaryArray(std::string const& filename, std::size_t const n)
result.size()); result.size());
if (!in.eof()) if (!in.eof())
{
ERR("EOF reached.\n"); ERR("EOF reached.\n");
}
return std::vector<T>(); return std::vector<T>();
} }
......
...@@ -125,7 +125,9 @@ bool XMLQtInterface::checkHash() const ...@@ -125,7 +125,9 @@ bool XMLQtInterface::checkHash() const
INFO("File is valid, hashfile written."); INFO("File is valid, hashfile written.");
} }
else else
{
WARN("File is valid but could not write hashfile!"); WARN("File is valid but could not write hashfile!");
}
return true; return true;
} }
} // namespace IO } // namespace IO
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment