diff options
author | Tor Brede Vekterli <vekterli@oath.com> | 2019-01-15 11:26:10 +0000 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@oath.com> | 2019-01-15 11:26:10 +0000 |
commit | 70ede48e10267df5e8fa5a33b7e214affae3ffe9 (patch) | |
tree | 720e650944eb73754d7643d29b4ab42a77dcd787 | |
parent | 959655d2bd9f743b34c6e5caac21e44de48187e3 (diff) |
Do not take refs to temporaries that immediately go out of scope
-rw-r--r-- | vdslib/src/vespa/vdslib/state/clusterstate.cpp | 2 |
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 == "") { |