diff options
author | JF002 <JF002@users.noreply.github.com> | 2020-12-01 21:44:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-01 21:44:44 +0100 |
commit | c6556bcdea7671f1c1daaa9e20c4c3d7cd5f29a4 (patch) | |
tree | 38c920cd13ed3768af2363de317ef3adf4483bd6 /src/components/ble/AlertNotificationClient.cpp | |
parent | c87de415b28710ec0f5a504fe4720402b9be5ebc (diff) | |
parent | 6e22509b5ffe6d7c29d09b07f38e64fb1bdc0b21 (diff) |
Merge pull request #136 from okaestne/include-cleanup
Includes cleanup
Diffstat (limited to 'src/components/ble/AlertNotificationClient.cpp')
-rw-r--r-- | src/components/ble/AlertNotificationClient.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/components/ble/AlertNotificationClient.cpp b/src/components/ble/AlertNotificationClient.cpp index abe41099..e7a18626 100644 --- a/src/components/ble/AlertNotificationClient.cpp +++ b/src/components/ble/AlertNotificationClient.cpp @@ -1,7 +1,7 @@ -#include <systemtask/SystemTask.h> -#include "NotificationManager.h" - #include "AlertNotificationClient.h" +#include <algorithm> +#include "NotificationManager.h" +#include "systemtask/SystemTask.h" using namespace Pinetime::Controllers; constexpr ble_uuid16_t AlertNotificationClient::ansServiceUuid; @@ -159,8 +159,8 @@ void AlertNotificationClient::OnNotification(ble_gap_event *event) { const auto maxBufferSize{maxMessageSize + headerSize}; const auto dbgPacketLen = OS_MBUF_PKTLEN(event->notify_rx.om); - size_t bufferSize = min(dbgPacketLen + stringTerminatorSize, maxBufferSize); - auto messageSize = min(maxMessageSize, (bufferSize - headerSize)); + size_t bufferSize = std::min(dbgPacketLen + stringTerminatorSize, maxBufferSize); + auto messageSize = std::min(maxMessageSize, (bufferSize - headerSize)); NotificationManager::Notification notif; os_mbuf_copydata(event->notify_rx.om, headerSize, messageSize - 1, notif.message.data()); |