From d07d9f3110c1ee425872eb349a5ddd6a75941e39 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 10 Feb 2017 19:31:21 -0500 Subject: Control: Convert raw pointer parameter into unique_ptr Raw pointers shouldn't be used as boundaries in scenarios where ownership is being taken. --- Source/Core/InputCommon/ControllerEmu/Control/Control.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Source/Core/InputCommon/ControllerEmu/Control/Control.cpp') diff --git a/Source/Core/InputCommon/ControllerEmu/Control/Control.cpp b/Source/Core/InputCommon/ControllerEmu/Control/Control.cpp index 00f9a71069..56c4cba12d 100644 --- a/Source/Core/InputCommon/ControllerEmu/Control/Control.cpp +++ b/Source/Core/InputCommon/ControllerEmu/Control/Control.cpp @@ -3,11 +3,14 @@ // Refer to the license.txt file included. #include "InputCommon/ControllerEmu/Control/Control.h" + +#include #include "InputCommon/ControlReference/ControlReference.h" namespace ControllerEmu { -Control::Control(ControlReference* ref, const std::string& name_) : control_ref(ref), name(name_) +Control::Control(std::unique_ptr ref, const std::string& name_) + : control_ref(std::move(ref)), name(name_) { } -- cgit v1.2.3