summaryrefslogtreecommitdiff
path: root/src/components/ble/AlertNotificationClient.cpp
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2021-01-04 18:56:56 (GMT)
committerGitea <gitea@fake.local>2021-01-04 18:56:56 (GMT)
commit1d940af924bac5728a4d494f780e298e5b67b707 (patch)
tree24540888f3d038ca3c88a0789b63faa8ac07d631 /src/components/ble/AlertNotificationClient.cpp
parent04abc91f157f5925ffa404728291a69893acf8cf (diff)
parent50ae0ae5e073ac48652e6c26549f9b19655e8da3 (diff)
Merge branch 'develop' of JF/PineTime into master
Diffstat (limited to 'src/components/ble/AlertNotificationClient.cpp')
-rw-r--r--src/components/ble/AlertNotificationClient.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/components/ble/AlertNotificationClient.cpp b/src/components/ble/AlertNotificationClient.cpp
index abe4109..e7a1862 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());