aboutsummaryrefslogtreecommitdiffstats
path: root/src/displayapp/screens/SystemInfo.cpp
diff options
context:
space:
mode:
authorJF002 <JF002@users.noreply.github.com>2021-03-31 20:33:37 +0200
committerGitHub <noreply@github.com>2021-03-31 20:33:37 +0200
commit58a2d000c4d49d96121894d6dd6bb861d7564bea (patch)
treee4a941aa36b6db254426bed309c48dd42d79dfd5 /src/displayapp/screens/SystemInfo.cpp
parent136d4bb85e36777f0f9877fd065476ba1c02ca90 (diff)
parent8eb947a2239d431146de9295e281ee0163fa20e2 (diff)
Merge pull request #238 from nscooling/make_unique
Resolved C++14 Cmake build issues so correctly building to C99/C++14
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 0d6f8e5a..949fd345 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);
}