unique_ptr'ing things and removing some XECLEANUP.
This commit is contained in:
@@ -32,9 +32,9 @@ void InitializeIfNeeded() {
|
||||
|
||||
void CleanupOnShutdown() {}
|
||||
|
||||
InputDriver* xe::hid::winkey::Create(InputSystem* input_system) {
|
||||
std::unique_ptr<InputDriver> Create(InputSystem* input_system) {
|
||||
InitializeIfNeeded();
|
||||
return new WinKeyInputDriver(input_system);
|
||||
return std::make_unique<WinKeyInputDriver>(input_system);
|
||||
}
|
||||
|
||||
} // namespace winkey
|
||||
|
||||
@@ -10,16 +10,17 @@
|
||||
#ifndef XENIA_HID_WINKEY_WINKEY_HID_H_
|
||||
#define XENIA_HID_WINKEY_WINKEY_HID_H_
|
||||
|
||||
#include <xenia/core.h>
|
||||
#include <memory>
|
||||
|
||||
XEDECLARECLASS2(xe, hid, InputDriver);
|
||||
XEDECLARECLASS2(xe, hid, InputSystem);
|
||||
#include <xenia/core.h>
|
||||
|
||||
namespace xe {
|
||||
namespace hid {
|
||||
class InputDriver;
|
||||
class InputSystem;
|
||||
namespace winkey {
|
||||
|
||||
InputDriver* Create(InputSystem* input_system);
|
||||
std::unique_ptr<InputDriver> Create(InputSystem* input_system);
|
||||
|
||||
} // namespace winkey
|
||||
} // namespace hid
|
||||
|
||||
Reference in New Issue
Block a user