Switches the HAL structs to use unique_ptr (#183)

This commit is contained in:
Thad House
2016-07-20 22:05:17 -07:00
committed by Peter Johnson
parent 1ca291f20b
commit 0901ae0808
24 changed files with 188 additions and 230 deletions

View File

@@ -7,13 +7,15 @@
#include "HAL/Power.h"
#include <memory>
#include "ChipObject.h"
static tPower* power = nullptr;
static std::unique_ptr<tPower> power;
static void initializePower(int32_t* status) {
if (power == nullptr) {
power = tPower::create(status);
power.reset(tPower::create(status));
}
}