diff --git a/src/ripple/app/hook/HookAPI.h b/src/ripple/app/hook/HookAPI.h index eefe35b8f..4161ed8f8 100644 --- a/src/ripple/app/hook/HookAPI.h +++ b/src/ripple/app/hook/HookAPI.h @@ -46,13 +46,13 @@ public: /// etxn APIs Expected, HookReturnCode> - emit(Slice txBlob) const; + emit(Slice const& txBlob) const; Expected etxn_burden() const; Expected - etxn_fee_base(Slice txBlob) const; + etxn_fee_base(Slice const& txBlob) const; Expected etxn_details(uint8_t* out_ptr) const; @@ -136,7 +136,7 @@ public: otxn_slot(uint32_t slot_into) const; Expected - otxn_param(Bytes param_name) const; + otxn_param(Bytes const& param_name) const; /// hook APIs AccountID diff --git a/src/ripple/app/hook/impl/HookAPI.cpp b/src/ripple/app/hook/impl/HookAPI.cpp index 5d955152f..d47b59f94 100644 --- a/src/ripple/app/hook/impl/HookAPI.cpp +++ b/src/ripple/app/hook/impl/HookAPI.cpp @@ -364,7 +364,7 @@ HookAPI::otxn_slot(uint32_t slot_into) const } Expected -HookAPI::otxn_param(Bytes param_name) const +HookAPI::otxn_param(Bytes const& param_name) const { if (param_name.size() < 1) return Unexpected(TOO_SMALL); @@ -567,7 +567,7 @@ HookAPI::hook_pos() const } Expected, HookReturnCode> -HookAPI::emit(Slice txBlob) const +HookAPI::emit(Slice const& txBlob) const { auto& applyCtx = hookCtx.applyCtx; auto j = applyCtx.app.journal("View"); @@ -896,7 +896,7 @@ HookAPI::etxn_burden() const } Expected -HookAPI::etxn_fee_base(ripple::Slice txBlob) const +HookAPI::etxn_fee_base(ripple::Slice const& txBlob) const { auto& applyCtx = hookCtx.applyCtx; auto j = applyCtx.app.journal("View");