summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Lioncash2019-07-05 17:40:51 -0400
committerGravatar Lioncash2019-07-05 17:45:34 -0400
commit48807e9a24e7e75344076547799b083f40def8fc (patch)
tree9589dcdf6f62b6f18fe2d0000b8d987b472212fc
parentcore/reporter: Add missing includes and forward declarations (diff)
downloadyuzu-48807e9a24e7e75344076547799b083f40def8fc.tar.gz
yuzu-48807e9a24e7e75344076547799b083f40def8fc.tar.xz
yuzu-48807e9a24e7e75344076547799b083f40def8fc.zip
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.
-rw-r--r--src/core/reporter.cpp2
1 files changed, 1 insertions, 1 deletions
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() {
34 34
35using namespace nlohmann; 35using namespace nlohmann;
36 36
37void SaveToFile(const json& json, const std::string& filename) { 37void SaveToFile(json json, const std::string& filename) {
38 if (!FileUtil::CreateFullPath(filename)) { 38 if (!FileUtil::CreateFullPath(filename)) {
39 LOG_ERROR(Core, "Failed to create path for '{}' to save report!", filename); 39 LOG_ERROR(Core, "Failed to create path for '{}' to save report!", filename);
40 return; 40 return;