diff --git a/td/telegram/MessageEntity.cpp b/td/telegram/MessageEntity.cpp index 57b6c004..2f2677f8 100644 --- a/td/telegram/MessageEntity.cpp +++ b/td/telegram/MessageEntity.cpp @@ -1142,8 +1142,9 @@ vector> find_urls(Slice str) { return result; } -static void check_is_sorted(const vector &entities) { - CHECK(std::is_sorted(entities.begin(), entities.end())); +#define check_is_sorted(entities) check_is_sorted_impl(entities, __LINE__) +static void check_is_sorted_impl(const vector &entities, int line) { + LOG_CHECK(std::is_sorted(entities.begin(), entities.end())) << line << " " << entities; } static void check_non_intersecting(const vector &entities) {