Skip to content

Commit

Permalink
clang-formatted
Browse files Browse the repository at this point in the history
  • Loading branch information
loglund committed Jan 10, 2024
1 parent 408afa0 commit 64ce8bb
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions src/abacus/metric.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#pragma once

#include <cassert>
#include <cstdint>
#include <cmath>
#include <cstdint>

#include "type.hpp"
#include "version.hpp"
Expand Down Expand Up @@ -222,10 +222,11 @@ class metric<abacus::type::float64>
{
assert(is_initialized());
// We don't allow assignment to NaN or Inf/-Inf
assert(!std::isnan(value) && !std::isinf(value) && "Cannot assign a "
"NaN or Inf/-Inf "
"value to a "
"float metric");
assert(!std::isnan(value) && !std::isinf(value) &&
"Cannot assign a "
"NaN or Inf/-Inf "
"value to a "
"float metric");
*m_memory = value;
return *this;
}
Expand All @@ -237,10 +238,11 @@ class metric<abacus::type::float64>
{
assert(is_initialized());
// We don't allow assignment to NaN or Inf/-Inf
assert(!std::isnan(value) && !std::isinf(value) && "Cannot assign a "
"NaN or Inf/-Inf "
"value to a "
"float metric");
assert(!std::isnan(value) && !std::isinf(value) &&
"Cannot assign a "
"NaN or Inf/-Inf "
"value to a "
"float metric");
*m_memory += value;
return *this;
}
Expand All @@ -252,10 +254,11 @@ class metric<abacus::type::float64>
{
assert(is_initialized());
// We don't allow assignment to NaN or Inf/-Inf
assert(!std::isnan(value) && !std::isinf(value) && "Cannot assign a "
"NaN or Inf/-Inf "
"value to a "
"float metric");
assert(!std::isnan(value) && !std::isinf(value) &&
"Cannot assign a "
"NaN or Inf/-Inf "
"value to a "
"float metric");

*m_memory -= value;
return *this;
Expand Down

0 comments on commit 64ce8bb

Please sign in to comment.