Workaround MSVC 19.4 Internal Compiler Error.

GitOrigin-RevId: 8fcb018f353bbf1d68d2e0253d4472656d196845
This commit is contained in:
levlam 2020-02-01 07:43:54 +03:00
parent 45d7e5c906
commit c41640df44
3 changed files with 7 additions and 2 deletions

View File

@ -250,4 +250,8 @@ void Global::add_location_access_hash(double latitude, double longitude, int64 a
location_access_hashes_[get_location_key(latitude, longitude)] = access_hash; location_access_hashes_[get_location_key(latitude, longitude)] = access_hash;
} }
double get_server_time() {
return G()->server_time();
}
} // namespace td } // namespace td

View File

@ -434,4 +434,6 @@ inline Global *G_impl(const char *file, int line) {
return static_cast<Global *>(context); return static_cast<Global *>(context);
} }
double get_server_time();
} // namespace td } // namespace td

View File

@ -36,13 +36,12 @@ inline Promise<Unit> get_erase_logevent_promise(uint64 logevent_id, Promise<Unit
template <class StorerT> template <class StorerT>
void store_time(double time_at, StorerT &storer) { void store_time(double time_at, StorerT &storer) {
double server_time = storer.context()->server_time();
if (time_at == 0) { if (time_at == 0) {
store(-1.0, storer); store(-1.0, storer);
} else { } else {
double time_left = max(time_at - Time::now(), 0.0); double time_left = max(time_at - Time::now(), 0.0);
store(time_left, storer); store(time_left, storer);
store(server_time, storer); store(get_server_time(), storer);
} }
} }