From dacea725dfe1749f8a6d9d0ad7da3b29e9ab0e95 Mon Sep 17 00:00:00 2001 From: Jarryd Beck Date: Wed, 15 Oct 2014 11:26:33 +1100 Subject: [PATCH] const reference --- src/cxxopts.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cxxopts.cpp b/src/cxxopts.cpp index df382b2..caa6c42 100644 --- a/src/cxxopts.cpp +++ b/src/cxxopts.cpp @@ -255,7 +255,7 @@ Options::parse(int& argc, char**& argv) //short or long option? if (result[4].length() != 0) { - std::string s = result[4]; + const std::string& s = result[4]; for (int i = 0; i != s.size(); ++i) { @@ -292,7 +292,7 @@ Options::parse(int& argc, char**& argv) } else if (result[1].length() != 0) { - std::string name = result[1]; + const std::string& name = result[1]; auto iter = m_options.find(name);