From 48807e9a24e7e75344076547799b083f40def8fc Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 5 Jul 2019 17:40:51 -0400 Subject: core/reporter: Allow moves into SaveToFile() Taking the json instance as a constant reference, makes all moves into the parameter non-functional, resulting in copies. Taking it by value allows moves to function. --- src/core/reporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/reporter.cpp') diff --git a/src/core/reporter.cpp b/src/core/reporter.cpp index dbc350070..6ea26fda7 100644 --- a/src/core/reporter.cpp +++ b/src/core/reporter.cpp @@ -34,7 +34,7 @@ std::string GetTimestamp() { using namespace nlohmann; -void SaveToFile(const json& json, const std::string& filename) { +void SaveToFile(json json, const std::string& filename) { if (!FileUtil::CreateFullPath(filename)) { LOG_ERROR(Core, "Failed to create path for '{}' to save report!", filename); return; -- cgit v1.2.3