refactor: code refactored to comply with clang-tidy
This commit is contained in:
1 parent
901b5e5394
commit
75f719add7
46 files changed
+489
-380
No files matched your search
@@ -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_; }
|
||||
|
||||
Reference in new issue
Block a user