diff options
author | Lioncash <mathew1800@gmail.com> | 2019-07-05 17:40:51 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-07-05 17:45:34 -0400 |
commit | 48807e9a24e7e75344076547799b083f40def8fc (patch) | |
tree | 9589dcdf6f62b6f18fe2d0000b8d987b472212fc /src/core/reporter.cpp | |
parent | 2321656dbe4eba8105b59576ae4ed486ca65918f (diff) |
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.
Diffstat (limited to 'src/core/reporter.cpp')
-rw-r--r-- | src/core/reporter.cpp | 2 |
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() { 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; |