diff options
| author | levlam <levlam@telegram.org> | 2019-10-22 02:12:58 +0300 |
|---|---|---|
| committer | levlam <levlam@telegram.org> | 2019-10-22 02:12:58 +0300 |
| commit | 918f6a0cfd7260db3ff9476b34b350891f7c4df4 (patch) | |
| tree | 20a8cd0cb697b7e47ed1ff1a8d907b9dca4e40a3 /test/set_with_position.cpp | |
| parent | e84e131efddde7f11ebb543ec3634e34aa7cebce (diff) | |
Use td::contains and td::remove instead of std::find if possible.
GitOrigin-RevId: faa0863eb49ee8ce4c2138dfec022620f71d2f6a
Diffstat (limited to 'test/set_with_position.cpp')
| -rw-r--r-- | test/set_with_position.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/set_with_position.cpp b/test/set_with_position.cpp index f5da39615..d9f2f9e08 100644 --- a/test/set_with_position.cpp +++ b/test/set_with_position.cpp @@ -7,6 +7,7 @@ #include "td/telegram/SetWithPosition.h" #include "td/utils/common.h" +#include "td/utils/misc.h" #include "td/utils/Random.h" #include "td/utils/tests.h" @@ -21,8 +22,7 @@ template <class T> class OldSetWithPosition { public: void add(T value) { - auto it = std::find(values_.begin(), values_.end(), value); - if (it != values_.end()) { + if (td::contains(values_, value)) { return; } values_.push_back(value); |
