mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-31 07:03:55 +00:00 
			
		
		
		
	[esp32_ble_client] Convert to C++17 nested namespace syntax
This commit is contained in:
		| @@ -6,8 +6,7 @@ | ||||
|  | ||||
| #ifdef USE_ESP32 | ||||
|  | ||||
| namespace esphome { | ||||
| namespace esp32_ble_client { | ||||
| namespace esphome::esp32_ble_client { | ||||
|  | ||||
| static const char *const TAG = "esp32_ble_client"; | ||||
|  | ||||
| @@ -93,7 +92,6 @@ esp_err_t BLECharacteristic::write_value(uint8_t *new_val, int16_t new_val_size) | ||||
|   return write_value(new_val, new_val_size, ESP_GATT_WRITE_TYPE_NO_RSP); | ||||
| } | ||||
|  | ||||
| }  // namespace esp32_ble_client | ||||
| }  // namespace esphome | ||||
| }  // namespace esphome::esp32_ble_client | ||||
|  | ||||
| #endif  // USE_ESP32 | ||||
|   | ||||
| @@ -8,8 +8,7 @@ | ||||
|  | ||||
| #include <vector> | ||||
|  | ||||
| namespace esphome { | ||||
| namespace esp32_ble_client { | ||||
| namespace esphome::esp32_ble_client { | ||||
|  | ||||
| namespace espbt = esphome::esp32_ble_tracker; | ||||
|  | ||||
| @@ -33,7 +32,6 @@ class BLECharacteristic { | ||||
|   BLEService *service; | ||||
| }; | ||||
|  | ||||
| }  // namespace esp32_ble_client | ||||
| }  // namespace esphome | ||||
| }  // namespace esphome::esp32_ble_client | ||||
|  | ||||
| #endif  // USE_ESP32 | ||||
|   | ||||
| @@ -8,8 +8,7 @@ | ||||
| #include <esp_gap_ble_api.h> | ||||
| #include <esp_gatt_defs.h> | ||||
|  | ||||
| namespace esphome { | ||||
| namespace esp32_ble_client { | ||||
| namespace esphome::esp32_ble_client { | ||||
|  | ||||
| static const char *const TAG = "esp32_ble_client"; | ||||
|  | ||||
| @@ -696,7 +695,6 @@ BLEDescriptor *BLEClientBase::get_descriptor(uint16_t handle) { | ||||
|   return nullptr; | ||||
| } | ||||
|  | ||||
| }  // namespace esp32_ble_client | ||||
| }  // namespace esphome | ||||
| }  // namespace esphome::esp32_ble_client | ||||
|  | ||||
| #endif  // USE_ESP32 | ||||
|   | ||||
| @@ -16,8 +16,7 @@ | ||||
| #include <esp_gatt_common_api.h> | ||||
| #include <esp_gattc_api.h> | ||||
|  | ||||
| namespace esphome { | ||||
| namespace esp32_ble_client { | ||||
| namespace esphome::esp32_ble_client { | ||||
|  | ||||
| namespace espbt = esphome::esp32_ble_tracker; | ||||
|  | ||||
| @@ -130,7 +129,6 @@ class BLEClientBase : public espbt::ESPBTClient, public Component { | ||||
|   void restore_medium_conn_params_(); | ||||
| }; | ||||
|  | ||||
| }  // namespace esp32_ble_client | ||||
| }  // namespace esphome | ||||
| }  // namespace esphome::esp32_ble_client | ||||
|  | ||||
| #endif  // USE_ESP32 | ||||
|   | ||||
| @@ -4,8 +4,7 @@ | ||||
|  | ||||
| #include "esphome/components/esp32_ble_tracker/esp32_ble_tracker.h" | ||||
|  | ||||
| namespace esphome { | ||||
| namespace esp32_ble_client { | ||||
| namespace esphome::esp32_ble_client { | ||||
|  | ||||
| namespace espbt = esphome::esp32_ble_tracker; | ||||
|  | ||||
| @@ -19,7 +18,6 @@ class BLEDescriptor { | ||||
|   BLECharacteristic *characteristic; | ||||
| }; | ||||
|  | ||||
| }  // namespace esp32_ble_client | ||||
| }  // namespace esphome | ||||
| }  // namespace esphome::esp32_ble_client | ||||
|  | ||||
| #endif  // USE_ESP32 | ||||
|   | ||||
| @@ -5,8 +5,7 @@ | ||||
|  | ||||
| #ifdef USE_ESP32 | ||||
|  | ||||
| namespace esphome { | ||||
| namespace esp32_ble_client { | ||||
| namespace esphome::esp32_ble_client { | ||||
|  | ||||
| static const char *const TAG = "esp32_ble_client"; | ||||
|  | ||||
| @@ -71,7 +70,6 @@ void BLEService::parse_characteristics() { | ||||
|   } | ||||
| } | ||||
|  | ||||
| }  // namespace esp32_ble_client | ||||
| }  // namespace esphome | ||||
| }  // namespace esphome::esp32_ble_client | ||||
|  | ||||
| #endif  // USE_ESP32 | ||||
|   | ||||
| @@ -8,8 +8,7 @@ | ||||
|  | ||||
| #include <vector> | ||||
|  | ||||
| namespace esphome { | ||||
| namespace esp32_ble_client { | ||||
| namespace esphome::esp32_ble_client { | ||||
|  | ||||
| namespace espbt = esphome::esp32_ble_tracker; | ||||
|  | ||||
| @@ -30,7 +29,6 @@ class BLEService { | ||||
|   BLECharacteristic *get_characteristic(uint16_t uuid); | ||||
| }; | ||||
|  | ||||
| }  // namespace esp32_ble_client | ||||
| }  // namespace esphome | ||||
| }  // namespace esphome::esp32_ble_client | ||||
|  | ||||
| #endif  // USE_ESP32 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user