Fix warnings.
This commit is contained in:
parent
24b09ce83d
commit
bdbee0765b
@ -96,7 +96,7 @@ BENCH(ToStringIntBig, "to_string<int> big") {
|
|||||||
BENCH(TlToStringUpdateFile, "TL to_string updateFile") {
|
BENCH(TlToStringUpdateFile, "TL to_string updateFile") {
|
||||||
auto x = td::td_api::make_object<td::td_api::updateFile>(get_file_object());
|
auto x = td::td_api::make_object<td::td_api::updateFile>(get_file_object());
|
||||||
|
|
||||||
td::uint32 res = 0;
|
std::size_t res = 0;
|
||||||
for (int i = 0; i < n; i++) {
|
for (int i = 0; i < n; i++) {
|
||||||
res += to_string(x).size();
|
res += to_string(x).size();
|
||||||
}
|
}
|
||||||
@ -119,7 +119,7 @@ BENCH(TlToStringMessage, "TL to_string message") {
|
|||||||
x->content_ = td::td_api::make_object<td::td_api::messagePhoto>(
|
x->content_ = td::td_api::make_object<td::td_api::messagePhoto>(
|
||||||
std::move(photo), td::td_api::make_object<td::td_api::formattedText>(), false, false);
|
std::move(photo), td::td_api::make_object<td::td_api::formattedText>(), false, false);
|
||||||
|
|
||||||
td::uint32 res = 0;
|
std::size_t res = 0;
|
||||||
for (int i = 0; i < n; i++) {
|
for (int i = 0; i < n; i++) {
|
||||||
res += to_string(x).size();
|
res += to_string(x).size();
|
||||||
}
|
}
|
||||||
|
@ -1221,7 +1221,7 @@ TEST(MessageEntities, is_visible_url) {
|
|||||||
td::string str = "a telegram.org telegran.org telegrao.org telegram.orc telegrap.org c";
|
td::string str = "a telegram.org telegran.org telegrao.org telegram.orc telegrap.org c";
|
||||||
td::vector<td::MessageEntity> entities;
|
td::vector<td::MessageEntity> entities;
|
||||||
entities.emplace_back(td::MessageEntity::Type::TextUrl, 0, 1, "telegrab.org");
|
entities.emplace_back(td::MessageEntity::Type::TextUrl, 0, 1, "telegrab.org");
|
||||||
entities.emplace_back(td::MessageEntity::Type::TextUrl, str.size() - 1, 1, "telegrax.org");
|
entities.emplace_back(td::MessageEntity::Type::TextUrl, static_cast<td::int32>(str.size()) - 1, 1, "telegrax.org");
|
||||||
td::fix_formatted_text(str, entities, false, false, false, false, true).ensure();
|
td::fix_formatted_text(str, entities, false, false, false, false, true).ensure();
|
||||||
td::FormattedText text{std::move(str), std::move(entities)};
|
td::FormattedText text{std::move(str), std::move(entities)};
|
||||||
ASSERT_EQ(td::get_first_url(text), "telegrab.org");
|
ASSERT_EQ(td::get_first_url(text), "telegrab.org");
|
||||||
|
Loading…
Reference in New Issue
Block a user