diff options
| author | Vasily Gerasimov <[email protected]> | 2022-02-10 16:49:10 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:49:10 +0300 | 
| commit | 1eb755fbca92172a6aec2f57371b2b3a19dfab43 (patch) | |
| tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp/protobuf/json/field_option.h | |
| parent | 6cdc8f140213c595e4ad38bc3d97fcef1146b8c3 (diff) | |
Restoring authorship annotation for Vasily Gerasimov <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/protobuf/json/field_option.h')
| -rw-r--r-- | library/cpp/protobuf/json/field_option.h | 18 | 
1 files changed, 9 insertions, 9 deletions
diff --git a/library/cpp/protobuf/json/field_option.h b/library/cpp/protobuf/json/field_option.h index 3a2db53a922..c8a8bfbff5e 100644 --- a/library/cpp/protobuf/json/field_option.h +++ b/library/cpp/protobuf/json/field_option.h @@ -1,10 +1,10 @@ -#pragma once  -  +#pragma once +  #include <google/protobuf/descriptor.h>  #include <google/protobuf/descriptor.pb.h>  #include <google/protobuf/message.h> -  -namespace NProtobufJson {  + +namespace NProtobufJson {      // Functor that defines whether given field has some option set to true      //      // Example: @@ -20,13 +20,13 @@ namespace NProtobufJson {              , Positive(positive)          {          } -  +          bool operator()(const NProtoBuf::Message&, const NProtoBuf::FieldDescriptor* field) const {              const NProtoBuf::FieldOptions& opt = field->options();              const bool val = opt.GetExtension(Option);              return Positive ? val : !val;          } -  +      private:          const TFieldOptionExtensionId& Option;          bool Positive; @@ -35,6 +35,6 @@ namespace NProtobufJson {      template <typename TFieldOptionExtensionId>      TFieldOptionFunctor<TFieldOptionExtensionId> MakeFieldOptionFunctor(const TFieldOptionExtensionId& option, bool positive = true) {          return TFieldOptionFunctor<TFieldOptionExtensionId>(option, positive); -    }  -  -}  +    } + +}  | 
