summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2016-03-28 07:59:20 +0200
committerDavid Tardon <dtardon@redhat.com>2016-03-28 08:00:26 +0200
commit0c1e7b28878b5976b596a5ac22880925805317d6 (patch)
treec40daa7da0e868e0d160de22b69680f36ce80d57 /src
parentfaf590599ddcc73b433f46b22c8ae36ff95a1782 (diff)
pass shared ptrs by value
Diffstat (limited to 'src')
-rw-r--r--src/lib/SW602Parser.cpp6
-rw-r--r--src/lib/SW602Parser.h12
2 files changed, 9 insertions, 9 deletions
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