summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/SystemInfo.cpp
diff options
context:
space:
mode:
authorNiall Cooling <niallcooling@gmail.com>2021-03-22 17:56:26 (GMT)
committerNiall Cooling <niallcooling@gmail.com>2021-03-22 17:56:26 (GMT)
commit8eb947a2239d431146de9295e281ee0163fa20e2 (patch)
treebead1be9cc9175ab1a394fa8eeb78f07618f3a7a /src/displayapp/screens/SystemInfo.cpp
parente5e3fc02b8a2adf9ea100c162d1290cecdf617ef (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.cpp6
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);
}