From 70ede48e10267df5e8fa5a33b7e214affae3ffe9 Mon Sep 17 00:00:00 2001 From: Tor Brede Vekterli Date: Tue, 15 Jan 2019 11:26:10 +0000 Subject: Do not take refs to temporaries that immediately go out of scope --- vdslib/src/vespa/vdslib/state/clusterstate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 == "") { -- cgit v1.2.3