From 5a59b1da75428860e7f467a49623834140cc678c Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Thu, 20 Sep 2018 16:51:09 -0700 Subject: [PATCH] Status avoid extra copies --- src/misc/pv/status.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/misc/pv/status.h b/src/misc/pv/status.h index 9093daa..4690511 100644 --- a/src/misc/pv/status.h +++ b/src/misc/pv/status.h @@ -77,13 +77,13 @@ namespace epics { namespace pvData { * Get error message describing an error. Required if error status. * @return error message. */ - inline std::string getMessage() const { return m_message; } + inline const std::string& getMessage() const { return m_message; } /** * Get stack dump where error (exception) happened. Optional. * @return stack dump. */ - inline std::string getStackDump() const { return m_stackDump; } + inline const std::string& getStackDump() const { return m_stackDump; } /** * Convenient OK test. Same as (getType() == StatusType.OK).