Skip to content

Commit 3eeb701

Browse files
[Silabs] Clean up anonymous enum constants to use constant expressions (#41684)
* [Silabs] Cleaned up anonymous enums constants to use constant expressions * Fixed syntax errors
1 parent 50635e0 commit 3eeb701

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/platform/silabs/BLEManagerImpl.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -146,12 +146,9 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla
146146
kExtAdvertisingEnabled = 0x0040,
147147
};
148148

149-
enum
150-
{
151-
kMaxConnections = BLE_LAYER_NUM_BLE_ENDPOINTS,
152-
kMaxDeviceNameLength = 21,
153-
kUnusedIndex = 0xFF,
154-
};
149+
static constexpr uint8_t kMaxConnections = BLE_LAYER_NUM_BLE_ENDPOINTS;
150+
static constexpr uint8_t kMaxDeviceNameLength = 21;
151+
static constexpr uint8_t kUnusedIndex = 0xFF;
155152

156153
static constexpr uint8_t kFlagTlvSize = 3; // 1 byte for length, 1b for type and 1b for the Flag value
157154
static constexpr uint8_t kUUIDTlvSize = 4; // 1 byte for length, 1b for type and 2b for the UUID value

0 commit comments

Comments
 (0)