Browse Source

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.
changes/91/636791/1
Monty Taylor 3 months ago
parent
commit
b89f989055
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      zuul-preview/main.cc

+ 1
- 1
zuul-preview/main.cc View File

@@ -23,7 +23,7 @@
23 23
 
24 24
 using namespace std;
25 25
 
26
-vector<string> split(string in)
26
+vector<string> split(const string &in)
27 27
 {
28 28
   istringstream stream(in);
29 29
   vector<string> parts;

Loading…
Cancel
Save