Include cleanup: components

This commit is contained in:
okaestne 2020-11-15 15:05:51 +01:00
parent c3475b92fa
commit 1516573df4
No known key found for this signature in database
GPG key ID: 06A81B143EA9588F
35 changed files with 207 additions and 124 deletions

View file

@ -1,10 +1,9 @@
#include <hal/nrf_rtc.h>
#include "NotificationManager.h"
#include <systemtask/SystemTask.h>
#include "AlertNotificationService.h"
#include <hal/nrf_rtc.h>
#include <cstring>
#include <algorithm>
#include "NotificationManager.h"
#include "systemtask/SystemTask.h"
using namespace Pinetime::Controllers;
@ -60,8 +59,8 @@ int AlertNotificationService::OnAlert(uint16_t conn_handle, uint16_t attr_handle
const auto maxBufferSize{maxMessageSize + headerSize};
const auto dbgPacketLen = OS_MBUF_PKTLEN(ctxt->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(ctxt->om, headerSize, messageSize-1, notif.message.data());