Skip to content

Commit fe53be6

Browse files
author
eshcherbin
committed
YT-22350: Optimize conditional discount and disk quota storage
aa0dd98e9a2e4c54f4e65bd37eb75541ce8fa219
1 parent e8f301b commit fe53be6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

yt/yt/core/misc/collection_helpers-inl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ std::vector<std::pair<typename T::key_type, typename T::mapped_type>> SortHashMa
319319
template <class T>
320320
void EnsureVectorSize(std::vector<T>& vector, ssize_t size, const T& defaultValue)
321321
{
322-
if (static_cast<ssize_t>(vector.size()) < size) {
322+
if (std::ssize(vector) < size) {
323323
vector.resize(size, defaultValue);
324324
}
325325
}
@@ -347,7 +347,7 @@ void AssignVectorAt(std::vector<T>& vector, ssize_t index, T&& value, const T& d
347347
template <class T>
348348
const T& VectorAtOr(const std::vector<T>& vector, ssize_t index, const T& defaultValue)
349349
{
350-
return index < static_cast<ssize_t>(vector.size()) ? vector[index] : defaultValue;
350+
return index < std::ssize(vector) ? vector[index] : defaultValue;
351351
}
352352

353353
////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)