forked from fmtlib/fmt
Don't use deprecated checked_array_iterator
This commit is contained in:
@ -1674,8 +1674,7 @@ TEST(format_test, format_custom) {
|
||||
|
||||
TEST(format_test, format_to_custom) {
|
||||
char buf[10] = {};
|
||||
auto end =
|
||||
&*fmt::format_to(fmt::detail::make_checked(buf, 10), "{}", Answer());
|
||||
auto end = fmt::format_to(buf, "{}", Answer());
|
||||
EXPECT_EQ(end, buf + 2);
|
||||
EXPECT_STREQ(buf, "42");
|
||||
}
|
||||
|
@ -167,10 +167,8 @@ struct scan_handler : error_handler {
|
||||
void on_text(const char* begin, const char* end) {
|
||||
auto size = to_unsigned(end - begin);
|
||||
auto it = scan_ctx_.begin();
|
||||
if (it + size > scan_ctx_.end() ||
|
||||
!std::equal(begin, end, make_checked(it, size))) {
|
||||
if (it + size > scan_ctx_.end() || !std::equal(begin, end, it))
|
||||
on_error("invalid input");
|
||||
}
|
||||
scan_ctx_.advance_to(it + size);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user