unique_ptr'ing things and removing some XECLEANUP.

This commit is contained in:
Ben Vanik
2014-08-20 23:26:46 -07:00
parent 244e8a8745
commit c59d053404
43 changed files with 271 additions and 347 deletions

View File

@@ -32,9 +32,9 @@ void InitializeIfNeeded() {
void CleanupOnShutdown() {}
InputDriver* xe::hid::xinput::Create(InputSystem* input_system) {
std::unique_ptr<InputDriver> Create(InputSystem* input_system) {
InitializeIfNeeded();
return new XInputInputDriver(input_system);
return std::make_unique<XInputInputDriver>(input_system);
}
} // namespace xinput

View File

@@ -10,16 +10,17 @@
#ifndef XENIA_HID_XINPUT_XINPUT_HID_H_
#define XENIA_HID_XINPUT_XINPUT_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 xinput {
InputDriver* Create(InputSystem* input_system);
std::unique_ptr<InputDriver> Create(InputSystem* input_system);
} // namespace xinput
} // namespace hid