* Coverage

* added fixes

* removed spacing

* removed junk

* removed print

* removed coverage

* removed useless stuff

* fix

---------

Co-authored-by: Saikari <lin@sz.cn.eu.org>
This commit is contained in:
2025-12-23 02:47:12 +03:00
committed by GitHub
parent a03620c18f
commit 897484bea1
39 changed files with 2482 additions and 145 deletions

View File

@@ -190,7 +190,7 @@ template<>
struct std::formatter<omath::Color> // NOLINT(*-dcl58-cpp)
{
[[nodiscard]]
static constexpr auto parse(std::format_parse_context& ctx)
static constexpr auto parse(const std::format_parse_context& ctx)
{
return ctx.begin();
}
@@ -207,6 +207,6 @@ struct std::formatter<omath::Color> // NOLINT(*-dcl58-cpp)
if constexpr (std::is_same_v<typename FormatContext::char_type, char8_t>)
return std::format_to(ctx.out(), u8"{}", col.to_u8string());
return std::unreachable();
std::unreachable();
}
};

View File

@@ -51,9 +51,13 @@ namespace omath
const auto whole_range_size = static_cast<std::ptrdiff_t>(std::distance(begin, end));
const std::ptrdiff_t scan_size = whole_range_size - static_cast<std::ptrdiff_t>(pattern.size());
const auto pattern_size = static_cast<std::ptrdiff_t>(parsed_pattern->size());
const std::ptrdiff_t scan_size = whole_range_size - pattern_size;
for (std::ptrdiff_t i = 0; i < scan_size; i++)
if (scan_size < 0)
return end;
for (std::ptrdiff_t i = 0; i <= scan_size; i++)
{
bool found = true;