all repos — fluxbox @ 5d56046b68635cea2c187e59a9d8c514e2d6bdb2

custom fork of the fluxbox windowmanager

FocusableList.cc,.hh: Pass string arguments by const reference.

Found by cppcheck
Ryan Pavlik rpavlik@iastate.edu
commit

5d56046b68635cea2c187e59a9d8c514e2d6bdb2

parent

85596c1ee215cd1c8ddff6118ef1bad130dde909

2 files changed, 4 insertions(+), 4 deletions(-)

jump to
M src/FocusableList.ccsrc/FocusableList.cc

@@ -73,7 +73,7 @@ &scr.focusControl().creationOrderList() :

&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 @@ init();

} 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();
M src/FocusableList.hhsrc/FocusableList.hh

@@ -49,9 +49,9 @@ STATIC_ORDER = 0x02 ///< use creation order instead of focused order

}; 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);