Browse Source

Restoring authorship annotation for <akindyakov@yandex-team.ru>. Commit 2 of 2.

akindyakov 3 years ago
parent
commit
6af118f891
3 changed files with 20 additions and 20 deletions
  1. 2 2
      util/datetime/cputimer.h
  2. 6 6
      util/string/cast.cpp
  3. 12 12
      util/string/cast_ut.cpp

+ 2 - 2
util/datetime/cputimer.h

@@ -23,7 +23,7 @@ public:
     TSimpleTimer() {
         Reset();
     }
-    TDuration Get() const { 
+    TDuration Get() const {
         return TInstant::Now() - T;
     }
     void Reset() {
@@ -38,7 +38,7 @@ public:
     TProfileTimer() {
         Reset();
     }
-    TDuration Get() const { 
+    TDuration Get() const {
         return TRusage::Get().Utime - T;
     }
     TDuration Step() {

+ 6 - 6
util/string/cast.cpp

@@ -614,17 +614,17 @@ bool TryFromStringImpl<TUtf16String>(const wchar16* data, size_t len, TUtf16Stri
     DEF_INT_SPEC_I(signed TYPE, i64, ID##SBounds) \
     DEF_INT_SPEC_I(unsigned TYPE, ui64, ID##UBounds)
 
-#define DEF_INT_SPEC_FIXED_WIDTH(TYPE, ID) \ 
-    DEF_INT_SPEC_I(TYPE, i64, ID##SBounds) \ 
-    DEF_INT_SPEC_I(u##TYPE, ui64, ID##UBounds) 
- 
-DEF_INT_SPEC_FIXED_WIDTH(i8, b) 
+#define DEF_INT_SPEC_FIXED_WIDTH(TYPE, ID) \
+    DEF_INT_SPEC_I(TYPE, i64, ID##SBounds) \
+    DEF_INT_SPEC_I(u##TYPE, ui64, ID##UBounds)
+
+DEF_INT_SPEC_FIXED_WIDTH(i8, b)
 DEF_INT_SPEC(short, s)
 DEF_INT_SPEC(int, i)
 DEF_INT_SPEC(long, l)
 DEF_INT_SPEC(long long, ll)
 
-#undef DEF_INT_SPEC_FIXED_WIDTH 
+#undef DEF_INT_SPEC_FIXED_WIDTH
 #undef DEF_INT_SPEC
 #undef DEF_INT_SPEC_I
 #undef DEF_INT_SPEC_II

+ 12 - 12
util/string/cast_ut.cpp

@@ -182,18 +182,18 @@ Y_UNIT_TEST_SUITE(TCastTest) {
         test2(bool, "");
         test2(bool, "a");
 
-        test2(ui8, -1); 
-        test1(i8, -1); 
-        test1(i8, SCHAR_MAX); 
-        test1(i8, SCHAR_MIN); 
-        test1(i8, SCHAR_MAX - 1); 
-        test1(i8, SCHAR_MIN + 1); 
-        test2(i8, (int)SCHAR_MAX + 1); 
-        test2(i8, (int)SCHAR_MIN - 1); 
-        test1(ui8, UCHAR_MAX); 
-        test1(ui8, UCHAR_MAX - 1); 
-        test2(ui8, (int)UCHAR_MAX + 1); 
-        test2(ui8, -1); 
+        test2(ui8, -1);
+        test1(i8, -1);
+        test1(i8, SCHAR_MAX);
+        test1(i8, SCHAR_MIN);
+        test1(i8, SCHAR_MAX - 1);
+        test1(i8, SCHAR_MIN + 1);
+        test2(i8, (int)SCHAR_MAX + 1);
+        test2(i8, (int)SCHAR_MIN - 1);
+        test1(ui8, UCHAR_MAX);
+        test1(ui8, UCHAR_MAX - 1);
+        test2(ui8, (int)UCHAR_MAX + 1);
+        test2(ui8, -1);
         test1(int, -1);
         test2(unsigned int, -1);
         test1(short int, -1);