diff options
| author | Niall Cooling <niallcooling@gmail.com> | 2021-03-22 17:56:26 (GMT) |
|---|---|---|
| committer | Niall Cooling <niallcooling@gmail.com> | 2021-03-22 17:56:26 (GMT) |
| commit | 8eb947a2239d431146de9295e281ee0163fa20e2 (patch) | |
| tree | bead1be9cc9175ab1a394fa8eeb78f07618f3a7a /src/displayapp/screens/SystemInfo.cpp | |
| parent | e5e3fc02b8a2adf9ea100c162d1290cecdf617ef (diff) | |
replaced all unique_ptr.reset calls with std::make_unique
Diffstat (limited to 'src/displayapp/screens/SystemInfo.cpp')
| -rw-r--r-- | src/displayapp/screens/SystemInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index 0d6f8e5..949fd34 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -104,14 +104,14 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen1() { uptimeDays, uptimeHours, uptimeMinutes, uptimeSeconds, batteryPercent, brightness, resetReason); - return std::unique_ptr<Screen>(new Screens::Label(app, t1)); + return std::make_unique<Screens::Label>(app, t1); } std::unique_ptr<Screen> SystemInfo::CreateScreen2() { auto& bleAddr = bleController.Address(); sprintf(t2, "BLE MAC: \n %02x:%02x:%02x:%02x:%02x:%02x", bleAddr[5], bleAddr[4], bleAddr[3], bleAddr[2], bleAddr[1], bleAddr[0]); - return std::unique_ptr<Screen>(new Screens::Label(app, t2)); + return std::make_unique<Screens::Label>(app, t2); } std::unique_ptr<Screen> SystemInfo::CreateScreen3() { @@ -123,5 +123,5 @@ std::unique_ptr<Screen> SystemInfo::CreateScreen3() { "Source code:\n" "https://github.com/\n" " JF002/InfiniTime"); - return std::unique_ptr<Screen>(new Screens::Label(app, t3)); + return std::make_unique<Screens::Label>(app, t3); } |
