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.
This commit is contained in:
Monty Taylor 2019-02-09 21:51:43 +00:00
parent 5302413002
commit b89f989055
1 changed files with 1 additions and 1 deletions

View File

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