diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2024-10-24 09:04:35 -0500 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2024-10-24 09:04:35 -0500 |
commit | 512d026de016f2720060d264adec02e56123851d (patch) | |
tree | 2c48965d968db70e37ae82e287dc80bd205b2d4a /source | |
parent | 5cc7cbc3704ec255eb5d0ac53b2cc0fcb1221d63 (diff) |
As always, formatting is a pain.
Diffstat (limited to 'source')
-rw-r--r-- | source/fud_assert.cpp | 4 | ||||
-rw-r--r-- | source/fud_format.cpp | 7 |
2 files changed, 4 insertions, 7 deletions
diff --git a/source/fud_assert.cpp b/source/fud_assert.cpp index ccc90a5..8811464 100644 --- a/source/fud_assert.cpp +++ b/source/fud_assert.cpp @@ -10,8 +10,8 @@ namespace fud { -constexpr std::size_t BITS_PER_OCTAL = 3; -constexpr auto MAX_LINE_CHARS = BITS_PER_OCTAL * sizeof(decltype(std::source_location{}.line())) + 3; +// constexpr std::size_t BITS_PER_OCTAL = 3; +// constexpr auto MAX_LINE_CHARS = BITS_PER_OCTAL * sizeof(decltype(std::source_location{}.line())) + 3; [[noreturn]] void assertFail(const char* assertion, const std::source_location sourceLocation) { diff --git a/source/fud_format.cpp b/source/fud_format.cpp index 04e611e..6bd5aae 100644 --- a/source/fud_format.cpp +++ b/source/fud_format.cpp @@ -23,12 +23,9 @@ FudStatus getFormatSign(StringView& formatView, FormatSpec& spec); } // namespace impl -Result<FormatSpec, FudStatus> FormatSpec::make(StringView formatView, size_t& specLength) +Result<FormatSpec, FudStatus> FormatSpec::parse(StringView formatView, size_t& specLength) { - static_cast<void>(formatView); - static_cast<void>(specLength); - - if (formatView[0] != FormatSpec::openBracket) { + if (formatView.length() < 2 || formatView[0] != FormatSpec::openBracket) { return FudStatus::ArgumentInvalid; } |