diff options
author | Dave Reisner <dreisner@archlinux.org> | 2013-01-06 22:07:11 -0500 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2013-01-06 22:07:11 -0500 |
commit | b22f92a207f5dc1c8152a978f255605eea138d67 (patch) | |
tree | c2fff3aa287d8a57bdfcc7877be725b34e45432a | |
parent | b195c6e81e94795dc5953f231cfddc9a61b6c604 (diff) | |
download | mirror-ponymix-b22f92a207f5dc1c8152a978f255605eea138d67.tar.gz mirror-ponymix-b22f92a207f5dc1c8152a978f255605eea138d67.tar.bz2 mirror-ponymix-b22f92a207f5dc1c8152a978f255605eea138d67.zip |
avoid copying the passed vector to find_fuzzy
-rw-r--r-- | pulse.cc | 2 | ||||
-rw-r--r-- | pulse.h | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -265,7 +265,7 @@ void PulseClient::mainloop_iterate(pa_operation* op) { } template<class T> -T* PulseClient::find_fuzzy(vector<T> haystack, const string& needle) { +T* PulseClient::find_fuzzy(vector<T>& haystack, const string& needle) { vector<T*> res; for (T& item : haystack) { @@ -221,7 +221,7 @@ class PulseClient { private: void mainloop_iterate(pa_operation* op); - template<class T> T* find_fuzzy(vector<T> haystack, const string& needle); + template<class T> T* find_fuzzy(vector<T>& haystack, const string& needle); void populate_server_info(); void populate_cards(); |