From 50919f279859fd1f6672c7ab0be83daa90dd9887 Mon Sep 17 00:00:00 2001 From: Carlos Pereira Atencio Date: Tue, 5 Sep 2023 13:25:59 +0100 Subject: [PATCH] BLE: Simplify device name string creation. It's a small change that results in the same string, but it saves about 36 bytes of flash with gcc v10.3 --- source/bluetooth/MicroBitBLEManager.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/source/bluetooth/MicroBitBLEManager.cpp b/source/bluetooth/MicroBitBLEManager.cpp index f45e0640..1e51d371 100644 --- a/source/bluetooth/MicroBitBLEManager.cpp +++ b/source/bluetooth/MicroBitBLEManager.cpp @@ -436,10 +436,7 @@ void MicroBitBLEManager::init( ManagedString deviceName, ManagedString serialNum #if CONFIG_ENABLED(MICROBIT_BLE_DEVICE_INFORMATION_SERVICE) MICROBIT_DEBUG_DMESG( "DEVICE_INFORMATION_SERVICE"); - ManagedString modelVersion("V2"); - ManagedString disName( MICROBIT_BLE_MODEL); - disName = disName + " " + modelVersion; - + ManagedString disName(MICROBIT_BLE_MODEL + ManagedString(" V2")); ble_dis_init_t disi; memset( &disi, 0, sizeof(disi)); disi.dis_char_rd_sec = SEC_OPEN;