X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fmisc.h;h=fe1143def0b35150eeedf51d3976baa46beb467e;hb=0a01dd044f8a8f291127ebf60462773bf12c90c7;hp=2fd2b408a1261644c7b0c7315f91dcb77cc2bf54;hpb=e639c4557786513018f625ff96f04b63157a85c1;p=stockfish diff --git a/src/misc.h b/src/misc.h index 2fd2b408..fe1143de 100644 --- a/src/misc.h +++ b/src/misc.h @@ -116,23 +116,10 @@ class ValueList { public: std::size_t size() const { return size_; } - void resize(std::size_t newSize) { size_ = newSize; } void push_back(const T& value) { values_[size_++] = value; } - T& operator[](std::size_t index) { return values_[index]; } - T* begin() { return values_; } - T* end() { return values_ + size_; } - const T& operator[](std::size_t index) const { return values_[index]; } const T* begin() const { return values_; } const T* end() const { return values_ + size_; } - void swap(ValueList& other) { - const std::size_t maxSize = std::max(size_, other.size_); - for (std::size_t i = 0; i < maxSize; ++i) { - std::swap(values_[i], other.values_[i]); - } - std::swap(size_, other.size_); - } - private: T values_[MaxSize]; std::size_t size_ = 0;