mirror of
https://github.com/fmtlib/fmt.git
synced 2025-07-31 19:24:48 +02:00
Fix a warning
This commit is contained in:
@@ -161,8 +161,10 @@ struct scan_handler : error_handler {
|
|||||||
void on_text(const char* begin, const char* end) {
|
void on_text(const char* begin, const char* end) {
|
||||||
auto size = end - begin;
|
auto size = end - begin;
|
||||||
auto it = scan_ctx_.begin();
|
auto it = scan_ctx_.begin();
|
||||||
if (it + size > scan_ctx_.end() || !std::equal(begin, end, it))
|
if (it + size > scan_ctx_.end() ||
|
||||||
|
!std::equal(begin, end, make_checked(it, size))) {
|
||||||
on_error("invalid input");
|
on_error("invalid input");
|
||||||
|
}
|
||||||
scan_ctx_.advance_to(it + size);
|
scan_ctx_.advance_to(it + size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user