[api] Fall back to make_unique on BK72xx (older GCC lacks make_unique_for_overwrite)

This commit is contained in:
J. Nick Koston
2026-03-07 08:38:52 -10:00
parent a4a7bbb149
commit b8fedf6e5b
+2 -2
View File
@@ -237,9 +237,9 @@ class Proto32Bit {
// NOTE: Proto64Bit class removed - wire type 1 (64-bit fixed) not supported
/// Helper to use make_unique_for_overwrite where available (skips zero-fill),
/// falling back to make_unique on ESP8266's older GCC.
/// falling back to make_unique on older GCC (ESP8266, BK72xx).
inline std::unique_ptr<uint8_t[]> make_buffer(size_t n) {
#ifdef USE_ESP8266
#if defined(USE_ESP8266) || defined(USE_BK72XX)
return std::make_unique<uint8_t[]>(n);
#else
return std::make_unique_for_overwrite<uint8_t[]>(n);