mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-05 21:24:27 +02:00
refactor: avoid always false comparison
This commit is contained in:
committed by
Mateusz Pusz
parent
deb1ee6efa
commit
67b1c499d1
@@ -44,7 +44,8 @@ struct basic_fixed_string {
|
|||||||
|
|
||||||
constexpr basic_fixed_string(const CharT (&txt)[N + 1]) noexcept
|
constexpr basic_fixed_string(const CharT (&txt)[N + 1]) noexcept
|
||||||
{
|
{
|
||||||
for (std::size_t i = 0; i < N; ++i) data_[i] = txt[i];
|
if constexpr (N != 0)
|
||||||
|
for (std::size_t i = 0; i < N; ++i) data_[i] = txt[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] constexpr std::size_t size() const noexcept { return N; }
|
[[nodiscard]] constexpr std::size_t size() const noexcept { return N; }
|
||||||
|
Reference in New Issue
Block a user