From 0c1e7b28878b5976b596a5ac22880925805317d6 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Mon, 28 Mar 2016 07:59:20 +0200 Subject: pass shared ptrs by value --- src/lib/SW602Parser.cpp | 6 +++--- src/lib/SW602Parser.h | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/lib/SW602Parser.cpp b/src/lib/SW602Parser.cpp index a74ce52..dcb2c10 100644 --- a/src/lib/SW602Parser.cpp +++ b/src/lib/SW602Parser.cpp @@ -78,7 +78,7 @@ SW602ListenerPtr SW602Parser::getMainListener() return m_parserState->getMainListener(); } -void SW602Parser::setGraphicListener(SW602GraphicListenerPtr &listener) +void SW602Parser::setGraphicListener(SW602GraphicListenerPtr listener) { m_parserState->m_graphicListener=listener; } @@ -89,7 +89,7 @@ void SW602Parser::resetGraphicListener() m_parserState->m_graphicListener.reset(); } -void SW602Parser::setSpreadsheetListener(SW602SpreadsheetListenerPtr &listener) +void SW602Parser::setSpreadsheetListener(SW602SpreadsheetListenerPtr listener) { m_parserState->m_spreadsheetListener=listener; } @@ -100,7 +100,7 @@ void SW602Parser::resetSpreadsheetListener() m_parserState->m_spreadsheetListener.reset(); } -void SW602Parser::setTextListener(SW602TextListenerPtr &listener) +void SW602Parser::setTextListener(SW602TextListenerPtr listener) { m_parserState->m_textListener=listener; } diff --git a/src/lib/SW602Parser.h b/src/lib/SW602Parser.h index 389595c..1f252cf 100644 --- a/src/lib/SW602Parser.h +++ b/src/lib/SW602Parser.h @@ -94,17 +94,17 @@ public: //! returns the main listener SW602ListenerPtr getMainListener(); //! returns the graphic listener - SW602GraphicListenerPtr &getGraphicListener() + const SW602GraphicListenerPtr &getGraphicListener() { return m_parserState->m_graphicListener; } //! returns the spreadsheet listener - SW602SpreadsheetListenerPtr &getSpreadsheetListener() + const SW602SpreadsheetListenerPtr &getSpreadsheetListener() { return m_parserState->m_spreadsheetListener; } //! returns the text listener - SW602TextListenerPtr &getTextListener() + const SW602TextListenerPtr &getTextListener() { return m_parserState->m_textListener; } @@ -155,15 +155,15 @@ protected: m_parserState->m_version = vers; } //! sets the graphic listener - void setGraphicListener(SW602GraphicListenerPtr &listener); + void setGraphicListener(SW602GraphicListenerPtr listener); //! resets the listener void resetGraphicListener(); //! sets the spreadsheet listener - void setSpreadsheetListener(SW602SpreadsheetListenerPtr &listener); + void setSpreadsheetListener(SW602SpreadsheetListenerPtr listener); //! resets the listener void resetSpreadsheetListener(); //! sets the text listener - void setTextListener(SW602TextListenerPtr &listener); + void setTextListener(SW602TextListenerPtr listener); //! resets the listener void resetTextListener(); //! Debugging: change the default ascii file -- cgit v1.2.3