Fix compilation error.
This commit is contained in:
parent
276b654f27
commit
3ec53c8d78
@ -765,7 +765,7 @@ void PollManager::set_poll_answer(PollId poll_id, FullMessageId full_message_id,
|
||||
return promise.set_error(Status::Error(400, "Can't revote in a quiz"));
|
||||
}
|
||||
|
||||
FlatHashMap<size_t, int> affected_option_ids;
|
||||
FlatHashMap<uint64, int> affected_option_ids;
|
||||
vector<string> options;
|
||||
for (auto &option_id : option_ids) {
|
||||
auto index = static_cast<size_t>(option_id);
|
||||
@ -786,7 +786,7 @@ void PollManager::set_poll_answer(PollId poll_id, FullMessageId full_message_id,
|
||||
}
|
||||
for (const auto &it : affected_option_ids) {
|
||||
if (it.second == 1) {
|
||||
invalidate_poll_option_voters(poll, poll_id, it.first - 1);
|
||||
invalidate_poll_option_voters(poll, poll_id, static_cast<size_t>(it.first - 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -6520,7 +6520,7 @@ void StickersManager::schedule_update_animated_emoji_clicked(const StickerSet *s
|
||||
}
|
||||
|
||||
auto all_sticker_ids = get_animated_emoji_click_stickers(sticker_set, emoji);
|
||||
FlatHashMap<int, FileId> sticker_ids;
|
||||
FlatHashMap<int32, FileId> sticker_ids;
|
||||
for (auto sticker_id : all_sticker_ids) {
|
||||
auto it = sticker_set->sticker_emojis_map_.find(sticker_id);
|
||||
if (it != sticker_set->sticker_emojis_map_.end()) {
|
||||
|
@ -112,7 +112,7 @@ TEST(FlatHashSet, TL) {
|
||||
|
||||
TEST(FlatHashMap, basic) {
|
||||
{
|
||||
td::FlatHashMap<int, int> map;
|
||||
td::FlatHashMap<td::int32, int> map;
|
||||
map[1] = 2;
|
||||
ASSERT_EQ(2, map[1]);
|
||||
ASSERT_EQ(1, map.find(1)->first);
|
||||
@ -126,13 +126,13 @@ TEST(FlatHashMap, basic) {
|
||||
map.erase(map.find(1));
|
||||
}
|
||||
|
||||
td::FlatHashMap<int, std::array<td::unique_ptr<td::string>, 10>> x;
|
||||
td::FlatHashMap<td::int32, std::array<td::unique_ptr<td::string>, 10>> x;
|
||||
auto y = std::move(x);
|
||||
x[12];
|
||||
x.erase(x.find(12));
|
||||
|
||||
{
|
||||
td::FlatHashMap<int, td::string> map = {{1, "hello"}, {2, "world"}};
|
||||
td::FlatHashMap<td::int32, td::string> map = {{1, "hello"}, {2, "world"}};
|
||||
ASSERT_EQ("hello", map[1]);
|
||||
ASSERT_EQ("world", map[2]);
|
||||
ASSERT_EQ(2u, map.size());
|
||||
@ -141,7 +141,7 @@ TEST(FlatHashMap, basic) {
|
||||
}
|
||||
|
||||
{
|
||||
td::FlatHashMap<int, td::string> map = {{1, "hello"}, {1, "world"}};
|
||||
td::FlatHashMap<td::int32, td::string> map = {{1, "hello"}, {1, "world"}};
|
||||
ASSERT_EQ("hello", map[1]);
|
||||
ASSERT_EQ(1u, map.size());
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user