refactor: code refactored to comply with clang-tidy

This commit is contained in:
Mateusz Pusz
2024-05-08 11:12:38 +02:00
parent 901b5e5394
commit 75f719add7
46 changed files with 489 additions and 380 deletions

View File

@ -45,11 +45,13 @@ public:
measurement() = default;
constexpr explicit measurement(value_type val, const value_type& err = {}) : value_(std::move(val))
// NOLINTNEXTLINE(bugprone-easily-swappable-parameters)
constexpr explicit measurement(value_type val, const value_type& err = {}) :
value_(std::move(val)), uncertainty_([&] {
using namespace std;
return abs(err);
}())
{
// it sucks that using declaration cannot be provided for a constructor initializer list
using namespace std;
uncertainty_ = abs(err);
}
[[nodiscard]] constexpr const value_type& value() const { return value_; }