From 91417e4ca39c216c9ca12a3418554ec7c6ba0950 Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Tue, 15 Aug 2017 22:37:05 +0200 Subject: cmServerProtocol: pass cmBacktraceRange by value --- Source/cmServerProtocol.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index b371e9e..557bee0 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -754,7 +754,7 @@ static Json::Value DumpBacktrace(const cmListFileBacktrace& backtrace) } static void DumpBacktraceRange(Json::Value& result, const std::string& type, - const cmBacktraceRange& range) + cmBacktraceRange range) { for (const auto& bt : range) { Json::Value obj = Json::objectValue; -- cgit v0.12 From cbcf6458f45f1b714487b3d6e1713d6e40e448f0 Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Tue, 15 Aug 2017 22:43:08 +0200 Subject: cmServerProtocol: Do not move into json::Value::append() CMake's copy of json-cpp is not aware of rvalues yet. It is confusing to pass the result of std::move to a function that takes a const& because no move will actually happen. This change may be reverted once CMake upgrades to a new version of json-cpp. --- Source/cmServerProtocol.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx index 557bee0..baaf11a 100644 --- a/Source/cmServerProtocol.cxx +++ b/Source/cmServerProtocol.cxx @@ -747,7 +747,7 @@ static Json::Value DumpBacktrace(const cmListFileBacktrace& backtrace) if (!backtraceCopy.Top().Name.empty()) { entry[kNAME_KEY] = backtraceCopy.Top().Name; } - result.append(std::move(entry)); + result.append(entry); backtraceCopy = backtraceCopy.Pop(); } return result; -- cgit v0.12