1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-26 12:43:48 +00:00

[bluetooth_proxy] [esp32_ble_tracker] [esp32_ble] Use C++17 nested namespace syntax (#9825)

This commit is contained in:
J. Nick Koston
2025-07-23 17:23:45 -10:00
committed by GitHub
parent 544cf9b9c0
commit ec2e0c50f1
15 changed files with 30 additions and 60 deletions

View File

@@ -8,8 +8,7 @@
#include "bluetooth_proxy.h"
namespace esphome {
namespace bluetooth_proxy {
namespace esphome::bluetooth_proxy {
static const char *const TAG = "bluetooth_proxy.connection";
@@ -422,7 +421,6 @@ esp32_ble_tracker::AdvertisementParserType BluetoothConnection::get_advertisemen
return this->proxy_->get_advertisement_parser_type();
}
} // namespace bluetooth_proxy
} // namespace esphome
} // namespace esphome::bluetooth_proxy
#endif // USE_ESP32

View File

@@ -4,8 +4,7 @@
#include "esphome/components/esp32_ble_client/ble_client_base.h"
namespace esphome {
namespace bluetooth_proxy {
namespace esphome::bluetooth_proxy {
class BluetoothProxy;
@@ -43,7 +42,6 @@ class BluetoothConnection : public esp32_ble_client::BLEClientBase {
// 1 byte used, 1 byte padding
};
} // namespace bluetooth_proxy
} // namespace esphome
} // namespace esphome::bluetooth_proxy
#endif // USE_ESP32

View File

@@ -7,8 +7,7 @@
#ifdef USE_ESP32
namespace esphome {
namespace bluetooth_proxy {
namespace esphome::bluetooth_proxy {
static const char *const TAG = "bluetooth_proxy";
@@ -502,7 +501,6 @@ void BluetoothProxy::bluetooth_scanner_set_mode(bool active) {
BluetoothProxy *global_bluetooth_proxy = nullptr; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
} // namespace bluetooth_proxy
} // namespace esphome
} // namespace esphome::bluetooth_proxy
#endif // USE_ESP32

View File

@@ -18,8 +18,7 @@
#include <esp_bt.h>
#include <esp_bt_device.h>
namespace esphome {
namespace bluetooth_proxy {
namespace esphome::bluetooth_proxy {
static const esp_err_t ESP_GATT_NOT_CONNECTED = -1;
static const int DONE_SENDING_SERVICES = -2;
@@ -158,7 +157,6 @@ class BluetoothProxy : public esp32_ble_tracker::ESPBTDeviceListener, public Com
extern BluetoothProxy *global_bluetooth_proxy; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)
} // namespace bluetooth_proxy
} // namespace esphome
} // namespace esphome::bluetooth_proxy
#endif // USE_ESP32