diff --git a/test/set_with_position.cpp b/test/set_with_position.cpp index 6ba193cd3..c65b8bc36 100644 --- a/test/set_with_position.cpp +++ b/test/set_with_position.cpp @@ -17,8 +17,6 @@ #include #include -using namespace td; - template class OldSetWithPosition { public: @@ -33,7 +31,7 @@ class OldSetWithPosition { if (it == values_.end()) { return; } - size_t i = it - values_.begin(); + std::size_t i = it - values_.begin(); values_.erase(it); if (pos_ > i) { pos_--; @@ -51,25 +49,25 @@ class OldSetWithPosition { } void merge(OldSetWithPosition &&other) { OldSetWithPosition res; - for (size_t i = 0; i < pos_; i++) { + for (std::size_t i = 0; i < pos_; i++) { res.add(values_[i]); } - for (size_t i = 0; i < other.pos_; i++) { + for (std::size_t i = 0; i < other.pos_; i++) { res.add(other.values_[i]); } res.pos_ = res.values_.size(); - for (size_t i = pos_; i < values_.size(); i++) { + for (std::size_t i = pos_; i < values_.size(); i++) { res.add(values_[i]); } - for (size_t i = other.pos_; i < other.values_.size(); i++) { + for (std::size_t i = other.pos_; i < other.values_.size(); i++) { res.add(other.values_[i]); } *this = std::move(res); } private: - std::vector values_; - size_t pos_{0}; + td::vector values_; + std::size_t pos_{0}; }; template class SetWithPosition> @@ -126,25 +124,24 @@ class CheckedSetWithPosition { } s_.merge(std::move(other.s_)); } - size_t size() const { + std::size_t size() const { return checked_.size() + not_checked_.size(); } private: std::set checked_; std::set not_checked_; - SetWithPosition s_; + td::SetWithPosition s_; }; template