2222#include " td/utils/Status.h"
2323
2424#include < memory>
25- #include < unordered_map >
25+ #include " td/utils/FlatHashMap.h "
2626#include < unordered_set>
2727#include < utility>
2828
@@ -160,17 +160,17 @@ class BackgroundManager final : public Actor {
160160 void do_upload_background_file (FileId file_id, const BackgroundType &type, bool for_dark_theme,
161161 tl_object_ptr<telegram_api::InputFile> &&input_file, Promise<Unit> &&promise);
162162
163- std::unordered_map <BackgroundId, Background, BackgroundIdHash> backgrounds_;
163+ FlatHashMap <BackgroundId, Background, BackgroundIdHash> backgrounds_;
164164
165- std::unordered_map <BackgroundId, std::pair<int64, FileSourceId>, BackgroundIdHash>
165+ FlatHashMap <BackgroundId, std::pair<int64, FileSourceId>, BackgroundIdHash>
166166 background_id_to_file_source_id_; // id -> [access_hash, file_source_id]
167167
168- std::unordered_map <string, BackgroundId> name_to_background_id_;
168+ FlatHashMap <string, BackgroundId> name_to_background_id_;
169169
170- std::unordered_map <FileId, BackgroundId, FileIdHash> file_id_to_background_id_;
170+ FlatHashMap <FileId, BackgroundId, FileIdHash> file_id_to_background_id_;
171171
172172 std::unordered_set<string> loaded_from_database_backgrounds_;
173- std::unordered_map <string, vector<Promise<Unit>>> being_loaded_from_database_backgrounds_;
173+ FlatHashMap <string, vector<Promise<Unit>>> being_loaded_from_database_backgrounds_;
174174
175175 BackgroundId set_background_id_[2 ];
176176 BackgroundType set_background_type_[2 ];
@@ -190,7 +190,7 @@ class BackgroundManager final : public Actor {
190190 : type_(type), for_dark_theme_(for_dark_theme), promise_(std::move(promise)) {
191191 }
192192 };
193- std::unordered_map <FileId, UploadedFileInfo, FileIdHash> being_uploaded_files_;
193+ FlatHashMap <FileId, UploadedFileInfo, FileIdHash> being_uploaded_files_;
194194
195195 BackgroundId max_local_background_id_;
196196 vector<BackgroundId> local_background_ids_[2 ];
0 commit comments