1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-03 18:42:23 +01:00
This commit is contained in:
J. Nick Koston
2025-10-01 12:38:33 +02:00
parent 40c4fadd2c
commit 3c594a7520

View File

@@ -312,13 +312,10 @@ class Logger : public Component {
}
#endif
static inline void copy_and_advance(char *buffer, uint16_t &pos, const char *data, uint8_t len) {
memcpy(buffer + pos, data, len);
pos += len;
}
static inline void copy_string(char *buffer, uint16_t &pos, const char *str) {
copy_and_advance(buffer, pos, str, strlen(str));
const size_t len = strlen(str);
memcpy(buffer + pos, str, len);
pos += len;
}
static inline void write_ansi_color_for_level(char *buffer, uint16_t &pos, uint8_t level) {