Skip to content

Commit d2be9c7

Browse files
authored
Merge 6506df4 into adbde26
2 parents adbde26 + 6506df4 commit d2be9c7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ydb/core/tx/datashard/datashard_user_db.cpp

+8-2
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,17 @@ NTable::EReady TDataShardUserDb::SelectRow(
4545
}
4646

4747
ui64 CalculateKeyBytes(const TArrayRef<const TRawTypeValue> key) {
48-
return std::accumulate(key.begin(), key.end(), 0, [](ui64 bytes, const TRawTypeValue& value) { return bytes + value.IsEmpty() ? 1 : value.Size(); });
48+
ui64 bytes = 0ull;
49+
for (const TRawTypeValue& value : key)
50+
bytes += value.IsEmpty() ? 1ull : value.Size();
51+
return bytes;
4952
};
5053

5154
ui64 CalculateValueBytes(const TArrayRef<const NIceDb::TUpdateOp> ops) {
52-
return std::accumulate(ops.begin(), ops.end(), 0, [](ui64 bytes, const NIceDb::TUpdateOp& op) { return bytes + op.Value.IsEmpty() ? 1 : op.Value.Size(); });
55+
ui64 bytes = 0ull;
56+
for (const NIceDb::TUpdateOp& op : ops)
57+
bytes += op.Value.IsEmpty() ? 1ull : op.Value.Size();
58+
return bytes;
5359
};
5460

5561
void TDataShardUserDb::UpdateRow(

0 commit comments

Comments
 (0)