summaryrefslogtreecommitdiff
path: root/src/buildtool/file_system/file_root.hpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-09-30 16:16:20 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-10-07 13:37:39 +0200
commit030af3e7af210617df00bf850476df6b46fb004d (patch)
tree6bfaff768b035c382fe0db07909ecd1f908f1eaf /src/buildtool/file_system/file_root.hpp
parentce23db59c6399199fa55b4b7dc8880522e2f1bca (diff)
downloadjustbuild-030af3e7af210617df00bf850476df6b46fb004d.tar.gz
Enable readability-* checks.
Diffstat (limited to 'src/buildtool/file_system/file_root.hpp')
-rw-r--r--src/buildtool/file_system/file_root.hpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/buildtool/file_system/file_root.hpp b/src/buildtool/file_system/file_root.hpp
index 82e30b89..fed32177 100644
--- a/src/buildtool/file_system/file_root.hpp
+++ b/src/buildtool/file_system/file_root.hpp
@@ -667,9 +667,11 @@ class FileRoot {
return std::pair(FileRoot{path}, std::move(path));
}
if (root[0] == FileRoot::kGitTreeMarker) {
- if (not(root.size() == 3 and root[1].is_string() and
- root[2].is_string()) and
- not(root.size() == 2 and root[1].is_string())) {
+ bool const has_one_arg = root.size() == 2 and root[1].is_string();
+ bool const has_two_args = root.size() == 3 and
+ root[1].is_string() and
+ root[2].is_string();
+ if (not has_one_arg and not has_two_args) {
*error_msg = fmt::format(
"\"git tree\" scheme expects one or two string "
"arguments, but found {} for {} of repository {}",
@@ -709,9 +711,11 @@ class FileRoot {
std::move(path));
}
if (root[0] == FileRoot::kGitTreeIgnoreSpecialMarker) {
- if (not(root.size() == 3 and root[1].is_string() and
- root[2].is_string()) and
- not(root.size() == 2 and root[1].is_string())) {
+ bool const has_one_arg = root.size() == 2 and root[1].is_string();
+ bool const has_two_args = root.size() == 3 and
+ root[1].is_string() and
+ root[2].is_string();
+ if (not has_one_arg and not has_two_args) {
*error_msg = fmt::format(
"\"git tree ignore-special\" scheme expects one or two "
"string arguments, but found {} for {} of repository {}",