mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Control: Convert raw pointer parameter into unique_ptr
Raw pointers shouldn't be used as boundaries in scenarios where ownership is being taken.
This commit is contained in:
@ -4,12 +4,13 @@
|
||||
|
||||
#include "InputCommon/ControllerEmu/Control/Input.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include "InputCommon/ControlReference/ControlReference.h"
|
||||
|
||||
namespace ControllerEmu
|
||||
{
|
||||
Input::Input(const std::string& name_) : Control(new InputReference, name_)
|
||||
Input::Input(const std::string& name_) : Control(std::make_unique<InputReference>(), name_)
|
||||
{
|
||||
}
|
||||
} // namespace ControllerEmu
|
||||
|
Reference in New Issue
Block a user