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

Commit 510559af authored by Ren-Pei Zeng's avatar Ren-Pei Zeng
Browse files

Don't use base::StringPrintf with non-constexpr format string

https://crrev.com/c/5855070 will disallow it.

Bug: 367200458
Test: mmm packages/modules/Bluetooth
Tag: #floss
Change-Id: Ied9ddb3716174c4664e47f31a64c847c8a0a8e6c
parent b379e520
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -16,8 +16,6 @@

#pragma once

#include <base/strings/stringprintf.h>

#include <cstdint>
#include <string>

@@ -85,7 +83,7 @@ inline bool is_legal_power_mode(tBTM_PM_MODE mode) {
}

inline std::string power_mode_text(tBTM_PM_MODE mode) {
  std::string s = base::StringPrintf((mode & BTM_PM_MD_FORCE) ? "" : "forced:");
  std::string s = (mode & BTM_PM_MD_FORCE) ? "" : "forced:";
  switch (mode & ~BTM_PM_MD_FORCE) {
    case BTM_PM_MD_ACTIVE:
      return s + std::string("active");