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