diff options
| author | levlam <levlam@telegram.org> | 2021-08-21 21:42:07 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2021-08-21 21:42:07 +0300 |
| commit | 43d9ba81ac677aa3d96e7b812a9e76117be687bd (patch) | |
| tree | a2c22a849d8815a1c81655159e3e480cbb21533c /tdnet | |
| parent | d229c5daed67277ae25605cef8e5989acbabe431 (diff) | |
Prefer std::unordered_map to std::map.
Diffstat (limited to 'tdnet')
| -rw-r--r-- | tdnet/td/net/SslStream.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tdnet/td/net/SslStream.cpp b/tdnet/td/net/SslStream.cpp index b9061b94d..84d9e5573 100644 --- a/tdnet/td/net/SslStream.cpp +++ b/tdnet/td/net/SslStream.cpp @@ -24,9 +24,9 @@ #include <openssl/x509v3.h> #include <cstring> -#include <map> #include <memory> #include <mutex> +#include <unordered_map> #if TD_PORT_WINDOWS #include <wincrypt.h> @@ -131,7 +131,7 @@ int verify_callback(int preverify_ok, X509_STORE_CTX *ctx) { static std::mutex warning_mutex; { std::lock_guard<std::mutex> lock(warning_mutex); - static std::map<std::string, double> next_warning_time; + static std::unordered_map<std::string, double> next_warning_time; double &next = next_warning_time[warning]; if (next <= now) { next = now + 300; // one warning per 5 minutes |
