diff --git a/include/xrpl/protocol/STObject.h b/include/xrpl/protocol/STObject.h index fbad0facca..8512e1d624 100644 --- a/include/xrpl/protocol/STObject.h +++ b/include/xrpl/protocol/STObject.h @@ -244,9 +244,9 @@ public: getFieldV256(SField const& field) const; STArray const& getFieldArray(SField const& field) const; - const STObject& + STObject const& getFieldObject(SField const& field) const; - const STCurrency& + STCurrency const& getFieldCurrency(SField const& field) const; STNumber const& getFieldNumber(SField const& field) const; diff --git a/src/libxrpl/protocol/STObject.cpp b/src/libxrpl/protocol/STObject.cpp index d2c76e4b0f..a5f1737418 100644 --- a/src/libxrpl/protocol/STObject.cpp +++ b/src/libxrpl/protocol/STObject.cpp @@ -689,7 +689,7 @@ STObject::getFieldArray(SField const& field) const return getFieldByConstRef(field, empty); } -const STObject& +STObject const& STObject::getFieldObject(SField const& field) const { static STObject const empty(field);