Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 882ce9ea authored by Jakub Pawłowski's avatar Jakub Pawłowski Committed by Gerrit Code Review
Browse files

Merge "Remove C-specific #define in bt_name.h" into main

parents 08e9004d 4fb7d3cb
Loading
Loading
Loading
Loading
+2 −8
Original line number Original line Diff line number Diff line
@@ -16,19 +16,14 @@


#pragma once
#pragma once


#ifdef __cplusplus
#include <cstdint>
#include <cstdint>
#include <cstring>
#include <cstring>
#else

#include <stdint.h>
#include "osi/include/compat.h"  // strlcpy
#include <string.h>
#endif


#define BD_NAME_LEN 248
#define BD_NAME_LEN 248
typedef uint8_t BD_NAME[BD_NAME_LEN + 1]; /* Device name */
typedef uint8_t BD_NAME[BD_NAME_LEN + 1]; /* Device name */


#ifdef __cplusplus
#include "osi/include/compat.h"  // strlcpy
inline constexpr BD_NAME kBtmBdNameEmpty = {};
inline constexpr BD_NAME kBtmBdNameEmpty = {};
constexpr size_t kBdNameLength = static_cast<size_t>(BD_NAME_LEN);
constexpr size_t kBdNameLength = static_cast<size_t>(BD_NAME_LEN);
constexpr uint8_t kBdNameDelim = (uint8_t)NULL;
constexpr uint8_t kBdNameDelim = (uint8_t)NULL;
@@ -61,4 +56,3 @@ inline bool bd_name_is_equal(const BD_NAME bd_name1, const BD_NAME bd_name2) {
                reinterpret_cast<void*>(const_cast<uint8_t*>(bd_name2)),
                reinterpret_cast<void*>(const_cast<uint8_t*>(bd_name2)),
                kBdNameLength + 1) == 0;
                kBdNameLength + 1) == 0;
}
}
#endif