Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,10 @@
"ci-build",
"ci-unix",
"dev-mode"
]
],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "ci-memcheck",
Expand Down Expand Up @@ -225,6 +228,17 @@
"SIZE_COVERAGE_HTML_COMMAND": "",
"SIZE_TOOL": "arm-none-eabi-size"
}
},
{
"name": "dev",
"inherits": [
"ci-build",
"ci-unix",
"dev-mode"
],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
}
],
"buildPresets": [
Expand Down
6 changes: 2 additions & 4 deletions include/emio/detail/bignum.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class bignum {

/// Returns `true` if the bignum is zero.
[[nodiscard]] constexpr bool is_zero() const noexcept {
return std::all_of(base_.begin(), base_.end(), [](uint32_t v) {
return std::all_of(base_.begin(), base_.begin() + size_, [](uint32_t v) {
return v == 0;
});
}
Expand Down Expand Up @@ -143,9 +143,7 @@ class bignum {
base_[i] = res.value;
}
EMIO_Z_DEV_ASSERT(!res.carry);
if (i > size_) {
size_ = i;
}
size_ = std::max(i, size_);
return *this;
}

Expand Down
2 changes: 1 addition & 1 deletion include/emio/detail/format/decode.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ struct finite_result_t {
bool inclusive{};
};

enum class category { zero, finite, infinity, nan };
enum class category : uint8_t { zero, finite, infinity, nan };

struct decode_result_t {
bool negative{};
Expand Down
2 changes: 1 addition & 1 deletion include/emio/detail/format/dragon.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ struct format_fp_result_t {
int16_t exp;
};

enum class format_exact_mode { significand_digits, decimal_point };
enum class format_exact_mode : bool { significand_digits, decimal_point };

inline constexpr format_fp_result_t format_exact(const finite_result_t& dec, emio::buffer& buf, format_exact_mode mode,
int16_t number_of_digits) noexcept {
Expand Down
2 changes: 1 addition & 1 deletion include/emio/detail/parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ namespace emio::detail {
/**
* Flag to enable/disable input validation.
*/
enum class input_validation { enabled, disabled };
enum class input_validation : bool { enabled, disabled };

inline constexpr uint8_t no_more_args = std::numeric_limits<uint8_t>::max();

Expand Down
Loading
Loading