summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty Taylor <mordred@inaugust.com>2019-02-09 21:51:43 +0000
committerMonty Taylor <mordred@inaugust.com>2019-02-09 21:51:43 +0000
commitb89f989055e52e2d9fe88923acbc8fd5f0019e4f (patch)
tree2f3d567275f050b4f8e8552cf1492796d6c8d7bc
parent5302413002608d902d55a9138767dd6d59dda607 (diff)
Pass input string by const reference
We're not mutating the string, so it can be const. And we can pass by reference instead of by value to avoid the copy.
-rw-r--r--zuul-preview/main.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/zuul-preview/main.cc b/zuul-preview/main.cc
index 908da95..fb497bf 100644
--- a/zuul-preview/main.cc
+++ b/zuul-preview/main.cc
@@ -23,7 +23,7 @@
23 23
24using namespace std; 24using namespace std;
25 25
26vector<string> split(string in) 26vector<string> split(const string &in)
27{ 27{
28 istringstream stream(in); 28 istringstream stream(in);
29 vector<string> parts; 29 vector<string> parts;