OSDN Git Service

Proper const API for stack/include/bt_type::bd_features_text
authorChris Manton <cmanton@google.com>
Sun, 22 Nov 2020 17:00:47 +0000 (09:00 -0800)
committerChris Manton <cmanton@google.com>
Tue, 24 Nov 2020 06:19:54 +0000 (22:19 -0800)
Towards loggable code

Bug: 163134718
Tag: #refactor
Test: gd/cert/run --host

Change-Id: I2d9700ce398963bfe90602d995ea4faedf082329

stack/include/bt_types.h

index 126fd55..2b35a2d 100644 (file)
@@ -623,11 +623,11 @@ typedef uint8_t
 
 #ifdef __cplusplus
 // Bit order [0]:0-7 [1]:8-15 ... [7]:56-63
-inline std::string bd_features_text(BD_FEATURES features) {
+inline std::string bd_features_text(const BD_FEATURES& features) {
   uint8_t len = BD_FEATURES_LEN;
   char buf[255];
   char* pbuf = buf;
-  uint8_t* b = features;
+  const uint8_t* b = features;
   while (len--) {
     pbuf += sprintf(pbuf, "0x%02x ", *b++);
   }