From f757c94c2bc1aab958e386c3417039ce23b1c7a4 Mon Sep 17 00:00:00 2001 From: Reinhold Gschweicher Date: Sat, 25 Jun 2022 22:26:56 +0200 Subject: [PATCH] run clang-format --- src/components/ble/NotificationManager.cpp | 6 +++--- src/components/ble/NotificationManager.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/ble/NotificationManager.cpp b/src/components/ble/NotificationManager.cpp index 4c115215d6..1f0defb420 100644 --- a/src/components/ble/NotificationManager.cpp +++ b/src/components/ble/NotificationManager.cpp @@ -33,7 +33,7 @@ NotificationManager::Notification NotificationManager::GetLastNotification() con return this->At(0); } -const NotificationManager::Notification &NotificationManager::At(NotificationManager::Notification::Idx idx) const { +const NotificationManager::Notification& NotificationManager::At(NotificationManager::Notification::Idx idx) const { if (idx >= notifications.size()) { assert(false); return notifications.at(beginIdx); // this should not happen @@ -42,7 +42,7 @@ const NotificationManager::Notification &NotificationManager::At(NotificationMan return notifications.at(read_idx); } -NotificationManager::Notification &NotificationManager::At(NotificationManager::Notification::Idx idx) { +NotificationManager::Notification& NotificationManager::At(NotificationManager::Notification::Idx idx) { if (idx >= notifications.size()) { assert(false); return notifications.at(beginIdx); // this should not happen @@ -57,7 +57,7 @@ NotificationManager::Notification NotificationManager::Get(NotificationManager:: NotificationManager::Notification::Idx NotificationManager::FindId(NotificationManager::Notification::Id id) const { for (NotificationManager::Notification::Idx idx = 0; idx < this->size; idx++) { - const NotificationManager::Notification ¬ification = this->At(idx); + const NotificationManager::Notification& notification = this->At(idx); if (notification.id == id) { return idx; } diff --git a/src/components/ble/NotificationManager.h b/src/components/ble/NotificationManager.h index 62af1f2bdb..f5c33750f6 100644 --- a/src/components/ble/NotificationManager.h +++ b/src/components/ble/NotificationManager.h @@ -61,8 +61,8 @@ namespace Pinetime { private: Notification::Id nextId {0}; Notification::Id GetNextId(); - const Notification &At(Notification::Idx idx) const; - Notification &At(Notification::Idx idx); + const Notification& At(Notification::Idx idx) const; + Notification& At(Notification::Idx idx); static constexpr uint8_t TotalNbNotifications = 5; std::array notifications; size_t beginIdx = TotalNbNotifications - 1; // index of the newest notification