diff options
| author | Lioncash <mathew1800@gmail.com> | 2022-10-26 11:15:25 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2022-10-26 11:21:48 -0400 |
| commit | e0ec9ffc36892319a5cd847dfd42f6aba4671685 (patch) | |
| tree | 4ac642ac27c90349d85e46bf84739b508bf9a909 /src/audio_core/in/audio_in_system.h | |
| parent | 041eb5bf57f4db8609341c77bd5d38ddcd8b2d80 (diff) | |
audio_in/out_system: Pass Initialize members by value where applicable
applet_resource_user_id isn't actually modified and is just assigned to
a member variable, so this doesn't need to be a mutable reference.
Similarly, the device name itself isn't modified and is only moved. We
pass by value here, since we can still perform the move, but eliminate a
sneaky set of calls that can unintentionally destroy the original
string. Given how nested the calls are, it's good to get rid of this
potential vector for a use-after-move bug.
Diffstat (limited to 'src/audio_core/in/audio_in_system.h')
| -rw-r--r-- | src/audio_core/in/audio_in_system.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/audio_core/in/audio_in_system.h b/src/audio_core/in/audio_in_system.h index b9dc0e60f..1c5154638 100644 --- a/src/audio_core/in/audio_in_system.h +++ b/src/audio_core/in/audio_in_system.h @@ -97,7 +97,7 @@ public: * @param applet_resource_user_id - Unused. * @return Result code. */ - Result Initialize(std::string& device_name, const AudioInParameter& in_params, u32 handle, + Result Initialize(std::string device_name, const AudioInParameter& in_params, u32 handle, u64 applet_resource_user_id); /** |
