refactor: Enable more clang-tidy readability checks (#6595)

Co-authored-by: Sergey Kuznetsov <kuzzz99@gmail.com>
This commit is contained in:
Alex Kremer
2026-03-24 15:42:12 +00:00
committed by GitHub
parent 8b986e4ab0
commit 0eedefbf45
248 changed files with 948 additions and 935 deletions

View File

@@ -199,7 +199,7 @@ Serializer::addVL(void const* ptr, int len)
{
int ret = addEncoded(len);
if (len)
if (len != 0)
addRaw(ptr, len);
return ret;
@@ -298,7 +298,7 @@ Serializer::decodeVLLength(int b1, int b2)
if (b1 > 240)
Throw<std::overflow_error>("b1>240");
return 193 + (b1 - 193) * 256 + b2;
return 193 + ((b1 - 193) * 256) + b2;
}
int
@@ -310,7 +310,7 @@ Serializer::decodeVLLength(int b1, int b2, int b3)
if (b1 > 254)
Throw<std::overflow_error>("b1>254");
return 12481 + (b1 - 241) * 65536 + b2 * 256 + b3;
return 12481 + ((b1 - 241) * 65536) + (b2 * 256) + b3;
}
//------------------------------------------------------------------------------