diff options
author | Ryan Pavlik <rpavlik@iastate.edu> | 2011-11-02 17:33:41 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2012-01-04 06:55:44 (GMT) |
commit | 5d56046b68635cea2c187e59a9d8c514e2d6bdb2 (patch) | |
tree | 5e165e1932d17f0b1514152a49ab327f1637a615 | |
parent | 85596c1ee215cd1c8ddff6118ef1bad130dde909 (diff) | |
download | fluxbox_paul-5d56046b68635cea2c187e59a9d8c514e2d6bdb2.zip fluxbox_paul-5d56046b68635cea2c187e59a9d8c514e2d6bdb2.tar.bz2 |
FocusableList.cc,.hh: Pass string arguments by const reference.
Found by cppcheck
-rw-r--r-- | src/FocusableList.cc | 4 | ||||
-rw-r--r-- | 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) { | |||
73 | &scr.focusControl().focusedOrderList(); | 73 | &scr.focusControl().focusedOrderList(); |
74 | } | 74 | } |
75 | 75 | ||
76 | FocusableList::FocusableList(BScreen &scr, const string pat): | 76 | FocusableList::FocusableList(BScreen &scr, const string & pat): |
77 | m_pat(0), m_parent(0), m_screen(scr) { | 77 | m_pat(0), m_parent(0), m_screen(scr) { |
78 | 78 | ||
79 | int options = 0; | 79 | int options = 0; |
@@ -86,7 +86,7 @@ FocusableList::FocusableList(BScreen &scr, const string pat): | |||
86 | } | 86 | } |
87 | 87 | ||
88 | FocusableList::FocusableList(BScreen &scr, const FocusableList &parent, | 88 | FocusableList::FocusableList(BScreen &scr, const FocusableList &parent, |
89 | const string pat): | 89 | const string & pat): |
90 | m_pat(new ClientPattern(pat.c_str())), m_parent(&parent), m_screen(scr) { | 90 | m_pat(new ClientPattern(pat.c_str())), m_parent(&parent), m_screen(scr) { |
91 | 91 | ||
92 | init(); | 92 | 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: | |||
49 | }; | 49 | }; |
50 | 50 | ||
51 | FocusableList(BScreen &scr): m_pat(0), m_parent(0), m_screen(scr) { } | 51 | FocusableList(BScreen &scr): m_pat(0), m_parent(0), m_screen(scr) { } |
52 | FocusableList(BScreen &scr, const std::string pat); | 52 | FocusableList(BScreen &scr, const std::string & pat); |
53 | FocusableList(BScreen &scr, const FocusableList &parent, | 53 | FocusableList(BScreen &scr, const FocusableList &parent, |
54 | const std::string pat); | 54 | const std::string & pat); |
55 | 55 | ||
56 | static void parseArgs(const std::string &in, int &opts, std::string &out); | 56 | static void parseArgs(const std::string &in, int &opts, std::string &out); |
57 | static const FocusableList *getListFromOptions(BScreen &scr, int opts); | 57 | static const FocusableList *getListFromOptions(BScreen &scr, int opts); |