diff options
author | sinister <sinister@yandex-team.ru> | 2022-02-10 16:50:50 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:50 +0300 |
commit | eace2adfb451fa3978f6edbae8aec53a50d1c969 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/yson_pull/detail/percent_scalar.h | |
parent | b76c7a19e20d232ef1e00ccbe68f64a3024d29ed (diff) | |
download | ydb-eace2adfb451fa3978f6edbae8aec53a50d1c969.tar.gz |
Restoring authorship annotation for <sinister@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/yson_pull/detail/percent_scalar.h')
-rw-r--r-- | library/cpp/yson_pull/detail/percent_scalar.h | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/library/cpp/yson_pull/detail/percent_scalar.h b/library/cpp/yson_pull/detail/percent_scalar.h index beec425c7d..ff4571842e 100644 --- a/library/cpp/yson_pull/detail/percent_scalar.h +++ b/library/cpp/yson_pull/detail/percent_scalar.h @@ -1,36 +1,36 @@ -#pragma once - -#include <util/generic/strbuf.h> - -namespace NYsonPull::NDetail { - enum class percent_scalar_type { - boolean, - float64 - }; - - struct percent_scalar { - //! Text boolean literals +#pragma once + +#include <util/generic/strbuf.h> + +namespace NYsonPull::NDetail { + enum class percent_scalar_type { + boolean, + float64 + }; + + struct percent_scalar { + //! Text boolean literals static constexpr TStringBuf true_literal = "%true"; static constexpr TStringBuf false_literal = "%false"; - //! Text floating-point literals + //! Text floating-point literals static constexpr TStringBuf nan_literal = "%nan"; static constexpr TStringBuf positive_inf_literal = "%inf"; static constexpr TStringBuf negative_inf_literal = "%-inf"; - - percent_scalar_type type; - union { - double as_float64; - bool as_boolean; - } value; - - percent_scalar(double v) { - type = percent_scalar_type::float64; - value.as_float64 = v; - } - - percent_scalar(bool v) { - type = percent_scalar_type::boolean; - value.as_boolean = v; - } - }; -} + + percent_scalar_type type; + union { + double as_float64; + bool as_boolean; + } value; + + percent_scalar(double v) { + type = percent_scalar_type::float64; + value.as_float64 = v; + } + + percent_scalar(bool v) { + type = percent_scalar_type::boolean; + value.as_boolean = v; + } + }; +} |