From 5d56046b68635cea2c187e59a9d8c514e2d6bdb2 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik <rpavlik@iastate.edu> Date: Wed, 2 Nov 2011 13:33:41 -0400 Subject: FocusableList.cc,.hh: Pass string arguments by const reference. Found by cppcheck --- src/FocusableList.cc | 4 ++-- src/FocusableList.hh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/FocusableList.cc b/src/FocusableList.cc index 87c5bcc..0850943 100644 --- a/src/FocusableList.cc +++ b/src/FocusableList.cc @@ -73,7 +73,7 @@ const FocusableList *FocusableList::getListFromOptions(BScreen &scr, int opts) { &scr.focusControl().focusedOrderList(); } -FocusableList::FocusableList(BScreen &scr, const string pat): +FocusableList::FocusableList(BScreen &scr, const string & pat): m_pat(0), m_parent(0), m_screen(scr) { int options = 0; @@ -86,7 +86,7 @@ FocusableList::FocusableList(BScreen &scr, const string pat): } FocusableList::FocusableList(BScreen &scr, const FocusableList &parent, - const string pat): + const string & pat): m_pat(new ClientPattern(pat.c_str())), m_parent(&parent), m_screen(scr) { init(); diff --git a/src/FocusableList.hh b/src/FocusableList.hh index a56fdbd..88bba44 100644 --- a/src/FocusableList.hh +++ b/src/FocusableList.hh @@ -49,9 +49,9 @@ public: }; FocusableList(BScreen &scr): m_pat(0), m_parent(0), m_screen(scr) { } - FocusableList(BScreen &scr, const std::string pat); + FocusableList(BScreen &scr, const std::string & pat); FocusableList(BScreen &scr, const FocusableList &parent, - const std::string pat); + const std::string & pat); static void parseArgs(const std::string &in, int &opts, std::string &out); static const FocusableList *getListFromOptions(BScreen &scr, int opts); -- cgit v0.11.2