From 84908d56c109b012d47e9905ecc1ff6c30e95a4b Mon Sep 17 00:00:00 2001 From: Mayukha Vadari Date: Fri, 29 May 2026 09:43:45 -0400 Subject: [PATCH] rename constant -> mutability --- include/xrpl/protocol/SOTemplate.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/include/xrpl/protocol/SOTemplate.h b/include/xrpl/protocol/SOTemplate.h index 05c9bedb39..de0b911e17 100644 --- a/include/xrpl/protocol/SOTemplate.h +++ b/include/xrpl/protocol/SOTemplate.h @@ -28,7 +28,7 @@ enum SOEStyle { enum SOETxMPTIssue { SoeMptNone, SoeMptSupported, SoeMptNotSupported }; // NOLINTNEXTLINE(cppcoreguidelines-use-enum-class) -enum SOEConstant { +enum SOEMutability { SoeImmutable, SoeMutable, SoeImmutableSetOnce, @@ -42,7 +42,7 @@ class SOElement // Use std::reference_wrapper so SOElement can be stored in a std::vector. std::reference_wrapper sField_; SOEStyle style_; - SOEConstant constant_ = SoeImmutable; + SOEMutability mutability_ = SoeImmutable; SOETxMPTIssue supportMpt_ = SoeMptNone; private: @@ -58,10 +58,10 @@ private: } XRPL_ASSERT( - constant_ != SoeImmutableSetOnce || style_ == SoeOptional, + mutability_ != SoeImmutableSetOnce || style_ == SoeOptional, "xrpl::SOElement::init : set-once fields must be optional"); XRPL_ASSERT( - constant_ != SoeMutable || style_ == SoeRequired || style_ == SoeOptional || + mutability_ != SoeMutable || style_ == SoeRequired || style_ == SoeOptional || style_ == SoeDefault, "xrpl::SOElement::init : mutable fields must have a valid style"); } @@ -72,8 +72,8 @@ public: init(fieldName); } - SOElement(SField const& fieldName, SOEStyle style, SOEConstant constant) - : sField_(fieldName), style_(style), constant_(constant) + SOElement(SField const& fieldName, SOEStyle style, SOEMutability mutability) + : sField_(fieldName), style_(style), mutability_(mutability) { init(fieldName); } @@ -94,9 +94,9 @@ public: SOElement( TypedField const& fieldName, SOEStyle style, - SOEConstant constant, + SOEMutability mutability, SOETxMPTIssue supportMpt = SoeMptNotSupported) - : sField_(fieldName), style_(style), constant_(constant), supportMpt_(supportMpt) + : sField_(fieldName), style_(style), mutability_(mutability), supportMpt_(supportMpt) { init(fieldName); } @@ -113,10 +113,10 @@ public: return style_; } - [[nodiscard]] SOEConstant - constant() const + [[nodiscard]] SOEMutability + mutability() const { - return constant_; + return mutability_; } [[nodiscard]] SOETxMPTIssue