diff options
author | neksard <neksard@yandex-team.ru> | 2022-02-10 16:45:23 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:23 +0300 |
commit | 8f7cf138264e0caa318144bf8a2c950e0b0a8593 (patch) | |
tree | 83bf5c8c8047c42d8475e6095df90ccdc3d1b57f /contrib/libs/double-conversion/utils.h | |
parent | d3a398281c6fd1d3672036cb2d63f842d2cb28c5 (diff) | |
download | ydb-8f7cf138264e0caa318144bf8a2c950e0b0a8593.tar.gz |
Restoring authorship annotation for <neksard@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/double-conversion/utils.h')
-rw-r--r-- | contrib/libs/double-conversion/utils.h | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/contrib/libs/double-conversion/utils.h b/contrib/libs/double-conversion/utils.h index 41c5b02d2c1..4beac855a50 100644 --- a/contrib/libs/double-conversion/utils.h +++ b/contrib/libs/double-conversion/utils.h @@ -28,10 +28,10 @@ #ifndef DOUBLE_CONVERSION_UTILS_H_ #define DOUBLE_CONVERSION_UTILS_H_ -#include <cstdlib> -#include <cstring> +#include <cstdlib> +#include <cstring> -#include <cassert> +#include <cassert> #ifndef ASSERT #define ASSERT(condition) \ assert(condition); @@ -67,24 +67,24 @@ inline void abort_noreturn() { abort(); } // the output of the division with the expected result. (Inlining must be // disabled.) // On Linux,x86 89255e-22 != Div_double(89255.0/1e22) -// -// For example: -/* -// -- in div.c -double Div_double(double x, double y) { return x / y; } - -// -- in main.c -double Div_double(double x, double y); // Forward declaration. - -int main(int argc, char** argv) { - return Div_double(89255.0, 1e22) == 89255e-22; -} -*/ -// Run as follows ./main || echo "correct" -// -// If it prints "correct" then the architecture should be here, in the "correct" section. +// +// For example: +/* +// -- in div.c +double Div_double(double x, double y) { return x / y; } + +// -- in main.c +double Div_double(double x, double y); // Forward declaration. + +int main(int argc, char** argv) { + return Div_double(89255.0, 1e22) == 89255e-22; +} +*/ +// Run as follows ./main || echo "correct" +// +// If it prints "correct" then the architecture should be here, in the "correct" section. #if defined(_M_X64) || defined(__x86_64__) || \ - defined(__ARMEL__) || defined(__avr32__) || defined(_M_ARM) || defined(_M_ARM64) || \ + defined(__ARMEL__) || defined(__avr32__) || defined(_M_ARM) || defined(_M_ARM64) || \ defined(__hppa__) || defined(__ia64__) || \ defined(__mips__) || \ defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \ @@ -92,12 +92,12 @@ int main(int argc, char** argv) { defined(__sparc__) || defined(__sparc) || defined(__s390__) || \ defined(__SH4__) || defined(__alpha__) || \ defined(_MIPS_ARCH_MIPS32R2) || \ - defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \ - defined(__riscv) || \ - defined(__or1k__) + defined(__AARCH64EL__) || defined(__aarch64__) || defined(__AARCH64EB__) || \ + defined(__riscv) || \ + defined(__or1k__) #define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1 -#elif defined(__mc68000__) || \ - defined(__pnacl__) || defined(__native_client__) +#elif defined(__mc68000__) || \ + defined(__pnacl__) || defined(__native_client__) #undef DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS #elif defined(_M_IX86) || defined(__i386__) || defined(__i386) #if defined(_WIN32) @@ -148,8 +148,8 @@ typedef uint16_t uc16; // A macro to disallow the evil copy constructor and operator= functions // This should be used in the private: declarations for a class -#ifndef DC_DISALLOW_COPY_AND_ASSIGN -#define DC_DISALLOW_COPY_AND_ASSIGN(TypeName) \ +#ifndef DC_DISALLOW_COPY_AND_ASSIGN +#define DC_DISALLOW_COPY_AND_ASSIGN(TypeName) \ TypeName(const TypeName&); \ void operator=(const TypeName&) #endif @@ -160,10 +160,10 @@ typedef uint16_t uc16; // This should be used in the private: declarations for a class // that wants to prevent anyone from instantiating it. This is // especially useful for classes containing only static methods. -#ifndef DC_DISALLOW_IMPLICIT_CONSTRUCTORS -#define DC_DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \ +#ifndef DC_DISALLOW_IMPLICIT_CONSTRUCTORS +#define DC_DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName) \ TypeName(); \ - DC_DISALLOW_COPY_AND_ASSIGN(TypeName) + DC_DISALLOW_COPY_AND_ASSIGN(TypeName) #endif namespace double_conversion { @@ -305,7 +305,7 @@ class StringBuilder { bool is_finalized() const { return position_ < 0; } - DC_DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder); + DC_DISALLOW_IMPLICIT_CONSTRUCTORS(StringBuilder); }; // The type-based aliasing rule allows the compiler to assume that pointers of @@ -336,12 +336,12 @@ template <class Dest, class Source> inline Dest BitCast(const Source& source) { // Compile time assertion: sizeof(Dest) == sizeof(Source) // A compile error here means your Dest and Source have different sizes. -#if __cplusplus >= 201103L - static_assert(sizeof(Dest) == sizeof(Source), - "source and destination size mismatch"); -#else - typedef char VerifySizesAreEqual[sizeof(Dest) == sizeof(Source) ? 1 : -1]; -#endif +#if __cplusplus >= 201103L + static_assert(sizeof(Dest) == sizeof(Source), + "source and destination size mismatch"); +#else + typedef char VerifySizesAreEqual[sizeof(Dest) == sizeof(Source) ? 1 : -1]; +#endif Dest dest; memmove(&dest, &source, sizeof(dest)); |