mirror of
https://github.com/esphome/esphome.git
synced 2026-06-24 13:27:14 +00:00
[core] Remove deprecated value_accuracy_to_string() (#17116)
This commit is contained in:
@@ -86,14 +86,6 @@ std::string str_sprintf(const char *fmt, ...) {
|
|||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- Value formatting helpers ---
|
|
||||||
|
|
||||||
std::string value_accuracy_to_string(float value, int8_t accuracy_decimals) {
|
|
||||||
char buf[VALUE_ACCURACY_MAX_LEN];
|
|
||||||
value_accuracy_to_buf(buf, value, accuracy_decimals);
|
|
||||||
return std::string(buf);
|
|
||||||
}
|
|
||||||
|
|
||||||
// --- Base64 helpers ---
|
// --- Base64 helpers ---
|
||||||
|
|
||||||
static constexpr const char *BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
static constexpr const char *BASE64_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||||
|
|||||||
@@ -94,14 +94,6 @@ std::string format_hex_pretty(const std::string &data, char separator = '.', boo
|
|||||||
/// @warning Allocates heap memory. Use format_bin_to() with a stack buffer instead.
|
/// @warning Allocates heap memory. Use format_bin_to() with a stack buffer instead.
|
||||||
std::string format_bin(const uint8_t *data, size_t length);
|
std::string format_bin(const uint8_t *data, size_t length);
|
||||||
|
|
||||||
// --- Value formatting helpers (allocating) ---
|
|
||||||
|
|
||||||
/// Format a float value with accuracy decimals to a string.
|
|
||||||
/// @deprecated Allocates heap memory. Use value_accuracy_to_buf() instead. Removed in 2026.7.0.
|
|
||||||
__attribute__((deprecated("Allocates heap memory. Use value_accuracy_to_buf() instead. Removed in 2026.7.0.")))
|
|
||||||
std::string
|
|
||||||
value_accuracy_to_string(float value, int8_t accuracy_decimals);
|
|
||||||
|
|
||||||
// --- Base64 helpers (allocating) ---
|
// --- Base64 helpers (allocating) ---
|
||||||
|
|
||||||
/// Encode a byte buffer to base64 string.
|
/// Encode a byte buffer to base64 string.
|
||||||
|
|||||||
Reference in New Issue
Block a user