diff options
| author | Michael Roizner <[email protected]> | 2022-02-10 16:50:47 +0300 | 
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:50:47 +0300 | 
| commit | 4e10711f67db90b5b08220fee274f8f0fe620485 (patch) | |
| tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /library/cpp | |
| parent | a196186fa7feb0aae6d87e1b6d890a83851be4f2 (diff) | |
Restoring authorship annotation for Michael Roizner <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'library/cpp')
| -rw-r--r-- | library/cpp/yt/misc/property.h | 48 | ||||
| -rw-r--r-- | library/cpp/yt/string/enum.h | 2 | 
2 files changed, 25 insertions, 25 deletions
| diff --git a/library/cpp/yt/misc/property.h b/library/cpp/yt/misc/property.h index d0d931219f3..bef8024ae15 100644 --- a/library/cpp/yt/misc/property.h +++ b/library/cpp/yt/misc/property.h @@ -1,7 +1,7 @@ -#pragma once  -  -////////////////////////////////////////////////////////////////////////////////  -  +#pragma once + +//////////////////////////////////////////////////////////////////////////////// +  //! Declares a trivial public read-write property that is passed by reference.  #define DECLARE_BYREF_RW_PROPERTY(type, name) \  public: \ @@ -13,18 +13,18 @@ public: \  #define DEFINE_BYREF_RW_PROPERTY(type, name, ...) \  protected: \      type name##_ { __VA_ARGS__ }; \ -    \  -public: \  +    \ +public: \      Y_FORCE_INLINE type& name() \ -    { \  -        return name##_; \  -    } \  -    \  +    { \ +        return name##_; \ +    } \ +    \      Y_FORCE_INLINE const type& name() const \ -    { \  -        return name##_; \  -    }  -  +    { \ +        return name##_; \ +    } +  //! Defines a trivial public read-write property that is passed by reference  //! and is not inline-initialized.  #define DEFINE_BYREF_RW_PROPERTY_NO_INIT(type, name) \ @@ -105,18 +105,18 @@ public: \  #define DEFINE_BYVAL_RW_PROPERTY(type, name, ...) \  protected: \      type name##_ { __VA_ARGS__ }; \ -    \  -public: \  +    \ +public: \      Y_FORCE_INLINE type Get##name() const \ -    { \  -        return name##_; \  -    } \  -    \  +    { \ +        return name##_; \ +    } \ +    \      Y_FORCE_INLINE void Set##name(type value) \ -    { \  -        name##_ = value; \  +    { \ +        name##_ = value; \      } \ -  +  //! Defines a trivial public read-write property that is passed by value.  //! All arguments after name are used as default value (via braced-init-list).  #define DEFINE_BYVAL_RW_PROPERTY_WITH_FLUENT_SETTER(declaringType, type, name, ...) \ @@ -208,7 +208,7 @@ public: \          return (delegateTo).Get##name(); \      } -////////////////////////////////////////////////////////////////////////////////  +////////////////////////////////////////////////////////////////////////////////  //! Below are macro helpers for extra properties.  //! Extra properties should be used for lazy memory allocation for properties that diff --git a/library/cpp/yt/string/enum.h b/library/cpp/yt/string/enum.h index f85cc69a19b..10dc02610f7 100644 --- a/library/cpp/yt/string/enum.h +++ b/library/cpp/yt/string/enum.h @@ -13,7 +13,7 @@ namespace NYT {  TString DecodeEnumValue(TStringBuf value);  TString EncodeEnumValue(TStringBuf value); -template <class T>  +template <class T>  T ParseEnum(TStringBuf value);  template <class T> | 
