From 8eb947a2239d431146de9295e281ee0163fa20e2 Mon Sep 17 00:00:00 2001 From: Niall Cooling Date: Mon, 22 Mar 2021 17:56:26 +0000 Subject: replaced all unique_ptr.reset calls with std::make_unique --- src/displayapp/screens/SystemInfo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/displayapp/screens/SystemInfo.cpp') diff --git a/src/displayapp/screens/SystemInfo.cpp b/src/displayapp/screens/SystemInfo.cpp index 0d6f8e5a..949fd345 100644 --- a/src/displayapp/screens/SystemInfo.cpp +++ b/src/displayapp/screens/SystemInfo.cpp @@ -104,14 +104,14 @@ std::unique_ptr SystemInfo::CreateScreen1() { uptimeDays, uptimeHours, uptimeMinutes, uptimeSeconds, batteryPercent, brightness, resetReason); - return std::unique_ptr(new Screens::Label(app, t1)); + return std::make_unique(app, t1); } std::unique_ptr 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(new Screens::Label(app, t2)); + return std::make_unique(app, t2); } std::unique_ptr SystemInfo::CreateScreen3() { @@ -123,5 +123,5 @@ std::unique_ptr SystemInfo::CreateScreen3() { "Source code:\n" "https://github.com/\n" " JF002/InfiniTime"); - return std::unique_ptr(new Screens::Label(app, t3)); + return std::make_unique(app, t3); } -- cgit v1.2.3-70-g09d2