Skip to content

Commit

Permalink
More compilation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
arkq committed May 8, 2024
1 parent 5a0bc36 commit a3a3bbf
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/ble/tests/TestBleLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <cstdint>
#include <memory>
#include <numeric>
#include <type_traits>

#include <gtest/gtest.h>

Expand Down Expand Up @@ -47,10 +48,20 @@ constexpr ChipBleUUID uuidChar2 = { { 0x18, 0xEE, 0x2E, 0xF5, 0x26, 0x3D, 0x45,
constexpr ChipBleUUID uuidChar3 = { { 0x64, 0x63, 0x02, 0x38, 0x87, 0x72, 0x45, 0xF2, 0xB8, 0x7D, 0x74, 0x8A, 0x83, 0x21, 0x8F,
0x04 } };

// Return unique BLE connection object for each call.
BLE_CONNECTION_OBJECT GetConnectionObject()
{
static auto connObj = reinterpret_cast<BLE_CONNECTION_OBJECT>(0x1234);
return ++connObj;

if constexpr (!std::is_pointer_v<decltype(connObj)>)
{
return ++connObj;
}
else
{
static auto n = 0;
return &connObj[n++];
}
}

}; // namespace
Expand Down

0 comments on commit a3a3bbf

Please sign in to comment.