diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-09-30 16:16:20 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-10-07 13:37:39 +0200 |
commit | 030af3e7af210617df00bf850476df6b46fb004d (patch) | |
tree | 6bfaff768b035c382fe0db07909ecd1f908f1eaf /src/buildtool/multithreading/async_map_utils.hpp | |
parent | ce23db59c6399199fa55b4b7dc8880522e2f1bca (diff) | |
download | justbuild-030af3e7af210617df00bf850476df6b46fb004d.tar.gz |
Enable readability-* checks.
Diffstat (limited to 'src/buildtool/multithreading/async_map_utils.hpp')
-rw-r--r-- | src/buildtool/multithreading/async_map_utils.hpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/buildtool/multithreading/async_map_utils.hpp b/src/buildtool/multithreading/async_map_utils.hpp index 47e5b5b4..2b2defeb 100644 --- a/src/buildtool/multithreading/async_map_utils.hpp +++ b/src/buildtool/multithreading/async_map_utils.hpp @@ -46,9 +46,13 @@ template <typename K, typename V> oss << fmt::format("Cycle detected in {}:", name) << std::endl; for (auto const& k : *cycle) { auto match = (k == cycle->back()); - auto prefix{match ? found ? "`-- "s : ".-> "s - : found ? "| "s - : " "s}; + std::string prefix; + if (match) { + prefix = found ? "`-- "s : ".-> "s; + } + else { + prefix = found ? "| "s : " "s; + } oss << prefix << key_printer(k) << std::endl; found = found or match; } |