summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2022-12-06 03:26:00 +0100
committerLioncash <mathew1800@gmail.com>2022-12-06 03:31:34 +0100
commite7f9f58fa408ac89ed1ce709494d84090b63bff0 (patch)
treefb5caf9dc17fe8639d5a9138727f1adf3c8961fc
parentMerge pull request #6833 from abouvier/unbundle (diff)
downloadyuzu-e7f9f58fa408ac89ed1ce709494d84090b63bff0.tar
yuzu-e7f9f58fa408ac89ed1ce709494d84090b63bff0.tar.gz
yuzu-e7f9f58fa408ac89ed1ce709494d84090b63bff0.tar.bz2
yuzu-e7f9f58fa408ac89ed1ce709494d84090b63bff0.tar.lz
yuzu-e7f9f58fa408ac89ed1ce709494d84090b63bff0.tar.xz
yuzu-e7f9f58fa408ac89ed1ce709494d84090b63bff0.tar.zst
yuzu-e7f9f58fa408ac89ed1ce709494d84090b63bff0.zip
-rw-r--r--src/core/reporter.cpp8
-rw-r--r--src/core/reporter.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/core/reporter.cpp b/src/core/reporter.cpp
index 6e21296f6..543b91d9a 100644
--- a/src/core/reporter.cpp
+++ b/src/core/reporter.cpp
@@ -339,8 +339,8 @@ void Reporter::SavePlayReport(PlayReportType type, u64 title_id, std::vector<std
}
void Reporter::SaveErrorReport(u64 title_id, Result result,
- std::optional<std::string> custom_text_main,
- std::optional<std::string> custom_text_detail) const {
+ const std::optional<std::string>& custom_text_main,
+ const std::optional<std::string>& custom_text_detail) const {
if (!IsReportingEnabled()) {
return;
}
@@ -354,8 +354,8 @@ void Reporter::SaveErrorReport(u64 title_id, Result result,
out["backtrace"] = GetBacktraceData(system);
out["error_custom_text"] = {
- {"main", *custom_text_main},
- {"detail", *custom_text_detail},
+ {"main", custom_text_main.value_or("")},
+ {"detail", custom_text_detail.value_or("")},
};
SaveToFile(std::move(out), GetPath("error_report", title_id, timestamp));
diff --git a/src/core/reporter.h b/src/core/reporter.h
index 68755cbde..983a9545a 100644
--- a/src/core/reporter.h
+++ b/src/core/reporter.h
@@ -61,8 +61,8 @@ public:
// Used by error applet
void SaveErrorReport(u64 title_id, Result result,
- std::optional<std::string> custom_text_main = {},
- std::optional<std::string> custom_text_detail = {}) const;
+ const std::optional<std::string>& custom_text_main = {},
+ const std::optional<std::string>& custom_text_detail = {}) const;
void SaveFSAccessLog(std::string_view log_message) const;