diff options
| author | 2021-10-28 02:52:43 -0400 | |
|---|---|---|
| committer | 2021-10-28 03:07:18 -0400 | |
| commit | 1ff9ad4e7c5bee8081052f46b1acfb109731313b (patch) | |
| tree | ab7470ed949b37854869b2a44488c2c9d7144871 | |
| parent | Merge pull request #7218 from bylaws/aswdqdsam (diff) | |
| download | yuzu-1ff9ad4e7c5bee8081052f46b1acfb109731313b.tar.gz yuzu-1ff9ad4e7c5bee8081052f46b1acfb109731313b.tar.xz yuzu-1ff9ad4e7c5bee8081052f46b1acfb109731313b.zip | |
hle/result: Remove cv-qualifiers from Arg in MakeResult
This removes the const qualification for types when MakeResult(arg) is used in a const member function, allowing for automatic deduction and removing the need to manually specify the non-const type as the template argument.
| -rw-r--r-- | src/core/hle/result.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/result.h b/src/core/hle/result.h index a755008d5..30025c790 100644 --- a/src/core/hle/result.h +++ b/src/core/hle/result.h | |||
| @@ -329,8 +329,8 @@ template <typename T, typename... Args> | |||
| 329 | * copy or move constructing. | 329 | * copy or move constructing. |
| 330 | */ | 330 | */ |
| 331 | template <typename Arg> | 331 | template <typename Arg> |
| 332 | [[nodiscard]] ResultVal<std::remove_reference_t<Arg>> MakeResult(Arg&& arg) { | 332 | [[nodiscard]] ResultVal<std::remove_cvref_t<Arg>> MakeResult(Arg&& arg) { |
| 333 | return ResultVal<std::remove_reference_t<Arg>>::WithCode(ResultSuccess, std::forward<Arg>(arg)); | 333 | return ResultVal<std::remove_cvref_t<Arg>>::WithCode(ResultSuccess, std::forward<Arg>(arg)); |
| 334 | } | 334 | } |
| 335 | 335 | ||
| 336 | /** | 336 | /** |