summaryrefslogtreecommitdiffstats
path: root/vdslib
diff options
context:
space:
mode:
authorTor Brede Vekterli <vekterli@oath.com>2019-01-15 11:26:10 +0000
committerTor Brede Vekterli <vekterli@oath.com>2019-01-15 11:26:10 +0000
commit70ede48e10267df5e8fa5a33b7e214affae3ffe9 (patch)
tree720e650944eb73754d7643d29b4ab42a77dcd787 /vdslib
parent959655d2bd9f743b34c6e5caac21e44de48187e3 (diff)
Do not take refs to temporaries that immediately go out of scope
Diffstat (limited to 'vdslib')
-rw-r--r--vdslib/src/vespa/vdslib/state/clusterstate.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/vdslib/src/vespa/vdslib/state/clusterstate.cpp b/vdslib/src/vespa/vdslib/state/clusterstate.cpp
index e50b18a5a82..b90e78104fc 100644
--- a/vdslib/src/vespa/vdslib/state/clusterstate.cpp
+++ b/vdslib/src/vespa/vdslib/state/clusterstate.cpp
@@ -74,7 +74,7 @@ ClusterState::ClusterState(const vespalib::string& serialized)
if (index == vespalib::string::npos) {
throw IllegalArgumentException("Token " + *it + " does not contain ':': " + serialized, VESPA_STRLOC);
}
- vespalib::stringref key = it->substr(0, index);
+ vespalib::string key = it->substr(0, index);
vespalib::stringref value = it->substr(index + 1);
if (key.size() > 0 && key[0] == '.') {
if (lastAbsolutePath == "") {