Skip to content

Commit

Permalink
Handle remaining clang-tidy messages
Browse files Browse the repository at this point in the history
  • Loading branch information
ckormanyos committed Jan 13, 2024
1 parent f93e6e3 commit 9339fb8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions math/softfloat/soft_double.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

//#define SOFT_DOUBLE_DISABLE_IOSTREAM

#define SOFT_DOUBLE_CONSTEXPR_BUILTIN_FLOATS 0
#define SOFT_DOUBLE_CONSTEXPR_BUILTIN_FLOATS 0 // NOLINT(cppcoreguidelines-macro-usage)

#include <array>
#if defined(__has_include)
#if ((__has_include(<bit>) != 0) && (defined(__cpp_lib_bit_cast) && (__cpp_lib_bit_cast == 201806L)))
#include <bit>
#undef SOFT_DOUBLE_CONSTEXPR_BUILTIN_FLOATS
#define SOFT_DOUBLE_CONSTEXPR_BUILTIN_FLOATS 1
#define SOFT_DOUBLE_CONSTEXPR_BUILTIN_FLOATS 1 // NOLINT(cppcoreguidelines-macro-usage)
#endif
#endif
#include <cstddef>
Expand Down Expand Up @@ -399,8 +399,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using float_type = BuiltInFloatType;
using unsigned_type = ExactUnsignedIntegralType;

const float_type my_f;
const unsigned_type my_u;
const float_type my_f; // NOLINT(misc-non-private-member-variables-in-classes)
const unsigned_type my_u; // NOLINT(misc-non-private-member-variables-in-classes)

explicit constexpr uz_type(float_type f) noexcept : my_f(f) { }
explicit constexpr uz_type(unsigned_type u) noexcept : my_u(u) { }
Expand All @@ -421,7 +421,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
using float_type = BuiltInFloatType;
using unsigned_type = ExactUnsignedIntegralType;

const float_type my_f;
const float_type my_f; // NOLINT(misc-non-private-member-variables-in-classes)

explicit constexpr uz_type(float_type f) noexcept : my_f(f) { }

Expand Down
4 changes: 2 additions & 2 deletions test/test_soft_double_spot_values.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ namespace local
static_assert(gravitational_constant < 1, "Error: Initialization constexpr-double does not properly work");
static_assert(gravitational_constant != near_pi_constant, "Error: Initialization constexpr-double does not properly work");
static_assert(4 * one_quarter_constant == 1, "Error: Initialization constexpr-double does not properly work");
static_assert(12 * one_quarter_constant < near_pi_constant, "Error: Initialization constexpr-double does not properly work");
static_assert(13 * one_quarter_constant > near_pi_constant, "Error: Initialization constexpr-double does not properly work");
static_assert(static_cast<int>(INT8_C(12)) * one_quarter_constant < near_pi_constant, "Error: Initialization constexpr-double does not properly work");
static_assert(static_cast<int>(INT8_C(13)) * one_quarter_constant > near_pi_constant, "Error: Initialization constexpr-double does not properly work");
#endif

bool result_is_ok { true };
Expand Down

0 comments on commit 9339fb8

Please sign in to comment.