diff options
| author | yazevnul <[email protected]> | 2022-02-10 16:46:46 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:46:46 +0300 |
| commit | 8cbc307de0221f84c80c42dcbe07d40727537e2c (patch) | |
| tree | 625d5a673015d1df891e051033e9fcde5c7be4e5 /library/cpp/packedtypes | |
| parent | 30d1ef3941e0dc835be7609de5ebee66958f215a (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/packedtypes')
| -rw-r--r-- | library/cpp/packedtypes/longs.h | 18 | ||||
| -rw-r--r-- | library/cpp/packedtypes/longs_ut.cpp | 8 | ||||
| -rw-r--r-- | library/cpp/packedtypes/packed.h | 16 | ||||
| -rw-r--r-- | library/cpp/packedtypes/packed_ut.cpp | 10 | ||||
| -rw-r--r-- | library/cpp/packedtypes/zigzag_ut.cpp | 4 |
5 files changed, 28 insertions, 28 deletions
diff --git a/library/cpp/packedtypes/longs.h b/library/cpp/packedtypes/longs.h index 084098d705e..91432bf007f 100644 --- a/library/cpp/packedtypes/longs.h +++ b/library/cpp/packedtypes/longs.h @@ -2,7 +2,7 @@ #include <util/system/defaults.h> // _BIDSCLASS _EXPCLASS #include <util/system/yassert.h> -#include <util/system/unaligned_mem.h> +#include <util/system/unaligned_mem.h> #define PUT_8(x, buf, shift) WriteUnaligned<ui8>((buf)++, (x) >> (shift)) #define GET_8_OR(x, buf, type, shift) (x) |= (type) * (buf)++ << (shift) @@ -310,9 +310,9 @@ template <typename T, typename C> inline const C* Unpack32(T& x, const C* src) { int pkLen = 0; const char* c = reinterpret_cast<const char*>(src); - Y_UNUSED(pkLen); + Y_UNUSED(pkLen); UNPACK_32(x, c, mem_traits, pkLen); - Y_ASSERT(pkLen); + Y_ASSERT(pkLen); return reinterpret_cast<const C*>(c); } @@ -320,28 +320,28 @@ template <typename T, typename C> inline const C* Unpack64(T& x, const C* src) { int pkLen = 0; const char* c = reinterpret_cast<const char*>(src); - Y_UNUSED(pkLen); + Y_UNUSED(pkLen); UNPACK_64(x, c, mem_traits, pkLen); - Y_ASSERT(pkLen); + Y_ASSERT(pkLen); return reinterpret_cast<const C*>(c); } template <typename T, typename C> inline C* Pack32(const T& x, C* dest) { int pkLen = 0; - Y_UNUSED(pkLen); + Y_UNUSED(pkLen); char* c = reinterpret_cast<char*>(dest); PACK_32(x, c, mem_traits, pkLen); - Y_ASSERT(pkLen); + Y_ASSERT(pkLen); return reinterpret_cast<C*>(c); } template <typename T, typename C> inline C* Pack64(const T& x, C* dest) { int pkLen = 0; - Y_UNUSED(pkLen); + Y_UNUSED(pkLen); char* c = reinterpret_cast<char*>(dest); PACK_64(x, c, mem_traits, pkLen); - Y_ASSERT(pkLen); + Y_ASSERT(pkLen); return reinterpret_cast<C*>(c); } diff --git a/library/cpp/packedtypes/longs_ut.cpp b/library/cpp/packedtypes/longs_ut.cpp index 8b06c934d2f..9ff51d21282 100644 --- a/library/cpp/packedtypes/longs_ut.cpp +++ b/library/cpp/packedtypes/longs_ut.cpp @@ -4,11 +4,11 @@ #include <library/cpp/digest/old_crc/crc.h> #include <util/string/util.h> -#include <util/stream/output.h> +#include <util/stream/output.h> #include <util/system/hi_lo.h> -Y_UNIT_TEST_SUITE(TLongsTest) { - Y_UNIT_TEST(TestLongs) { +Y_UNIT_TEST_SUITE(TLongsTest) { + Y_UNIT_TEST(TestLongs) { i16 x16 = 40; i64 x64 = 40; i64 y64; @@ -61,7 +61,7 @@ Y_UNIT_TEST_SUITE(TLongsTest) { } } - Y_UNIT_TEST(TestCornerCases) { + Y_UNIT_TEST(TestCornerCases) { TestCornerCasesImpl<i32>(31); TestCornerCasesImpl<i64>(63); } diff --git a/library/cpp/packedtypes/packed.h b/library/cpp/packedtypes/packed.h index 88cff26ae2a..b741fec77ee 100644 --- a/library/cpp/packedtypes/packed.h +++ b/library/cpp/packedtypes/packed.h @@ -2,34 +2,34 @@ #include <library/cpp/streams/zc_memory_input/zc_memory_input.h> -#include <util/stream/output.h> +#include <util/stream/output.h> #include <util/ysaveload.h> #include "longs.h" struct Stream_traits { template <typename T> - static T get(IInputStream& in) { + static T get(IInputStream& in) { T x; ::Load(&in, x); return x; } - static ui8 get_8(IInputStream& in) { + static ui8 get_8(IInputStream& in) { return get<ui8>(in); } - static ui16 get_16(IInputStream& in) { + static ui16 get_16(IInputStream& in) { return get<ui16>(in); } - static ui32 get_32(IInputStream& in) { + static ui32 get_32(IInputStream& in) { return get<ui32>(in); } - static void put_8(ui8 x, IOutputStream& out) { + static void put_8(ui8 x, IOutputStream& out) { ::Save(&out, x); } - static void put_16(ui16 x, IOutputStream& out) { + static void put_16(ui16 x, IOutputStream& out) { ::Save(&out, x); } - static void put_32(ui32 x, IOutputStream& out) { + static void put_32(ui32 x, IOutputStream& out) { ::Save(&out, x); } static int is_good(IInputStream& /*in*/) { diff --git a/library/cpp/packedtypes/packed_ut.cpp b/library/cpp/packedtypes/packed_ut.cpp index 70a22cf9c31..5d0d11b4278 100644 --- a/library/cpp/packedtypes/packed_ut.cpp +++ b/library/cpp/packedtypes/packed_ut.cpp @@ -14,7 +14,7 @@ static ui64 gSeed = 42; template<typename T> static T PseudoRandom(T max = Max<T>()) { - Y_ASSERT(max != 0); + Y_ASSERT(max != 0); // stupid and non-threadsafe, but very predictable chaos generator gSeed += 1; gSeed *= 419; @@ -24,7 +24,7 @@ static T PseudoRandom(T max = Max<T>()) { #endif } -Y_UNIT_TEST_SUITE(TPackedTest) { +Y_UNIT_TEST_SUITE(TPackedTest) { void TestPackUi32Sub(ui32 v, const TVector<char>& p) { TBufferOutput out; PackUI32(out, v); @@ -47,7 +47,7 @@ Y_UNIT_TEST_SUITE(TPackedTest) { } } - Y_UNIT_TEST(TestPackUi32) { + Y_UNIT_TEST(TestPackUi32) { ui32 v; TVector<char> pv; @@ -89,7 +89,7 @@ Y_UNIT_TEST_SUITE(TPackedTest) { } #if 0 - Y_UNIT_TEST(ReadWrite32) { + Y_UNIT_TEST(ReadWrite32) { TBuffer buffer(65536); char* writePtr = buffer.Data(); @@ -108,7 +108,7 @@ Y_UNIT_TEST_SUITE(TPackedTest) { } } - Y_UNIT_TEST(ReadWrite64) { + Y_UNIT_TEST(ReadWrite64) { TBuffer buffer(65536); char* writePtr = buffer.Data(); diff --git a/library/cpp/packedtypes/zigzag_ut.cpp b/library/cpp/packedtypes/zigzag_ut.cpp index 13b78b7481d..f7fd1f57106 100644 --- a/library/cpp/packedtypes/zigzag_ut.cpp +++ b/library/cpp/packedtypes/zigzag_ut.cpp @@ -2,7 +2,7 @@ #include <library/cpp/testing/unittest/registar.h> -Y_UNIT_TEST_SUITE(TZigZagTest) { +Y_UNIT_TEST_SUITE(TZigZagTest) { template <typename T> void TestEncodeDecode(T value) { auto encoded = ZigZagEncode(value); @@ -30,7 +30,7 @@ Y_UNIT_TEST_SUITE(TZigZagTest) { TestEncodeDecode((TSignedInt)-123); } - Y_UNIT_TEST(TestSigned) { + Y_UNIT_TEST(TestSigned) { TestImpl<i16>(); TestImpl<i32>(); TestImpl<i64>(); |
