forked from mirror/OpenTTD
Codechange: Replace SmallVector::Length() with std::vector::size()
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
{
|
||||
PoolVector *pools = PoolBase::GetPools();
|
||||
pools->Erase(pools->Find(this));
|
||||
if (pools->Length() == 0) delete pools;
|
||||
if (pools->size() == 0) delete pools;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -73,7 +73,7 @@ private:
|
||||
if (!this->data[index].valid) return index;
|
||||
}
|
||||
|
||||
if (index >= this->data.Length() && index < Tmax_size) {
|
||||
if (index >= this->data.size() && index < Tmax_size) {
|
||||
this->data.Resize(index + 1);
|
||||
}
|
||||
return index;
|
||||
|
@@ -217,16 +217,6 @@ public:
|
||||
return is_member;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the number of items in the list.
|
||||
*
|
||||
* @return The number of items in the list.
|
||||
*/
|
||||
inline uint Length() const
|
||||
{
|
||||
return std::vector<T>::size();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the pointer to the first item (const)
|
||||
*
|
||||
|
Reference in New Issue
Block a user