summaryrefslogtreecommitdiff
path: root/src/displayapp/screens/Notifications.h
diff options
context:
space:
mode:
authorReinhold Gschweicher <pyro4hell@gmail.com>2022-01-29 22:30:03 (GMT)
committerJF <JF002@users.noreply.github.com>2022-03-03 20:08:45 (GMT)
commita29e30c1876891e504ad62fb35d3b1be76b175a4 (patch)
treea55b673133cff0b80dee3a70ea80346c2105f24b /src/displayapp/screens/Notifications.h
parent29f0bce46bd531ffa83f3445c0e0d893217aa50d (diff)
Notifications: replace newlines in label-copy because of const char* title
The variable `title` is defined as `const char*`, which means, that `strchr()` returns a `const char*` as well according to https://www.cplusplus.com/reference/cstring/strchr/ But in the same line the return value is assigned to a non-const `char*`, which shouldn't be allowed (error with `-pedantic`). Because the `lv_label` creates an internal copy of the title sting, just modify that one instead and replace newline in the copied string.
Diffstat (limited to 'src/displayapp/screens/Notifications.h')
-rw-r--r--src/displayapp/screens/Notifications.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/displayapp/screens/Notifications.h b/src/displayapp/screens/Notifications.h
index f49d3b3..7416035 100644
--- a/src/displayapp/screens/Notifications.h
+++ b/src/displayapp/screens/Notifications.h
@@ -62,10 +62,6 @@ namespace Pinetime {
};
private:
- struct NotificationData {
- const char* title;
- const char* text;
- };
Pinetime::Controllers::NotificationManager& notificationManager;
Pinetime::Controllers::AlertNotificationService& alertNotificationService;
Pinetime::Controllers::MotorController& motorController;