From e38a4ead43e67ffacd7f48f81034677af1faa516 Mon Sep 17 00:00:00 2001 From: Tor Brede Vekterli Date: Mon, 13 Mar 2017 15:36:21 +0000 Subject: Don't return stringref to temporary buffer This line was last changed in 2011 so, uh, it's been buggy for a while. Presumably this has been aggressively inlined, so going via the stringref hasn't actually happened during normal compilation. --- storage/src/vespa/storage/visiting/visitorthread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/src/vespa/storage/visiting/visitorthread.cpp b/storage/src/vespa/storage/visiting/visitorthread.cpp index 48ff14d9dec..4b96faee14b 100644 --- a/storage/src/vespa/storage/visiting/visitorthread.cpp +++ b/storage/src/vespa/storage/visiting/visitorthread.cpp @@ -65,7 +65,7 @@ VisitorThread::Event::Event( } namespace { - vespalib::stringref getThreadName(uint32_t i) { + vespalib::string getThreadName(uint32_t i) { vespalib::asciistream name; name << "Visitor thread " << i; return name.str(); -- cgit v1.2.3