Fix some std:: namespace function usages.
GitOrigin-RevId: f867d613f9f86fa25a2a7ead29c0a7dadfb8402d
This commit is contained in:
parent
18b09b4ab1
commit
c407c507ad
@ -38,6 +38,7 @@
|
|||||||
#include "td/utils/Time.h"
|
#include "td/utils/Time.h"
|
||||||
#include "td/utils/tl_parsers.h"
|
#include "td/utils/tl_parsers.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
@ -250,8 +251,8 @@ ActorOwn<> get_full_config(IPAddress ip_address, Promise<FullConfig> promise) {
|
|||||||
|
|
||||||
std::vector<std::unique_ptr<Listener>> auth_key_listeners_;
|
std::vector<std::unique_ptr<Listener>> auth_key_listeners_;
|
||||||
void notify() {
|
void notify() {
|
||||||
auto it = remove_if(auth_key_listeners_.begin(), auth_key_listeners_.end(),
|
auto it = std::remove_if(auth_key_listeners_.begin(), auth_key_listeners_.end(),
|
||||||
[&](auto &listener) { return !listener->notify(); });
|
[&](auto &listener) { return !listener->notify(); });
|
||||||
auth_key_listeners_.erase(it, auth_key_listeners_.end());
|
auth_key_listeners_.erase(it, auth_key_listeners_.end());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -964,7 +964,7 @@ class CliClient final : public Actor {
|
|||||||
|
|
||||||
void on_cmd(string cmd) {
|
void on_cmd(string cmd) {
|
||||||
// TODO: need to remove https://en.wikipedia.org/wiki/ANSI_escape_code from cmd
|
// TODO: need to remove https://en.wikipedia.org/wiki/ANSI_escape_code from cmd
|
||||||
cmd.erase(remove_if(cmd.begin(), cmd.end(), [](char c) { return 0 <= c && c < 32; }), cmd.end());
|
cmd.erase(std::remove_if(cmd.begin(), cmd.end(), [](char c) { return 0 <= c && c < 32; }), cmd.end());
|
||||||
LOG(INFO) << "CMD:[" << cmd << "]";
|
LOG(INFO) << "CMD:[" << cmd << "]";
|
||||||
|
|
||||||
string op;
|
string op;
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
#include "td/utils/port/RwMutex.h"
|
#include "td/utils/port/RwMutex.h"
|
||||||
#include "td/utils/tl_helpers.h"
|
#include "td/utils/tl_helpers.h"
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
namespace td {
|
namespace td {
|
||||||
|
|
||||||
class AuthDataSharedImpl : public AuthDataShared {
|
class AuthDataSharedImpl : public AuthDataShared {
|
||||||
@ -99,8 +101,8 @@ class AuthDataSharedImpl : public AuthDataShared {
|
|||||||
void notify() {
|
void notify() {
|
||||||
auto lock = rw_mutex_.lock_read();
|
auto lock = rw_mutex_.lock_read();
|
||||||
|
|
||||||
auto it = remove_if(auth_key_listeners_.begin(), auth_key_listeners_.end(),
|
auto it = std::remove_if(auth_key_listeners_.begin(), auth_key_listeners_.end(),
|
||||||
[&](auto &listener) { return !listener->notify(); });
|
[&](auto &listener) { return !listener->notify(); });
|
||||||
auth_key_listeners_.erase(it, auth_key_listeners_.end());
|
auth_key_listeners_.erase(it, auth_key_listeners_.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,7 +138,7 @@ RSA *PublicRsaKeyShared::get_rsa_locked(int64 fingerprint) {
|
|||||||
|
|
||||||
void PublicRsaKeyShared::notify() {
|
void PublicRsaKeyShared::notify() {
|
||||||
auto lock = rw_mutex_.lock_read();
|
auto lock = rw_mutex_.lock_read();
|
||||||
auto it = remove_if(listeners_.begin(), listeners_.end(), [&](auto &listener) { return !listener->notify(); });
|
auto it = std::remove_if(listeners_.begin(), listeners_.end(), [&](auto &listener) { return !listener->notify(); });
|
||||||
listeners_.erase(it, listeners_.end());
|
listeners_.erase(it, listeners_.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ static std::vector<PqQuery> gen_pq_queries() {
|
|||||||
res.emplace_back(p, q);
|
res.emplace_back(p, q);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sort(res.begin(), res.end(), cmp);
|
std::sort(res.begin(), res.end(), cmp);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user