mirror of
https://github.com/esphome/esphome.git
synced 2026-09-01 10:36:01 +00:00
Rename varint_slow_ to varint_slow for clang-tidy naming
Static methods use lower_snake_case without trailing underscore. The trailing underscore convention is for member fields only. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
244e672b0a
commit
44b50055af
@@ -8,7 +8,7 @@ namespace esphome::api {
|
||||
|
||||
static const char *const TAG = "api.proto";
|
||||
|
||||
uint32_t ProtoSize::varint_slow_(uint32_t value) {
|
||||
uint32_t ProtoSize::varint_slow(uint32_t value) {
|
||||
// value is guaranteed >= 128 here (fast path handled inline)
|
||||
if (value < 16384) {
|
||||
return 2; // 14 bits
|
||||
|
||||
@@ -524,10 +524,10 @@ class ProtoSize {
|
||||
return 4;
|
||||
return 5;
|
||||
}
|
||||
return varint_slow_(value);
|
||||
return varint_slow(value);
|
||||
}
|
||||
// Slow path for varint >= 128, outlined to keep fast path small
|
||||
static uint32_t varint_slow_(uint32_t value) __attribute__((noinline));
|
||||
static uint32_t varint_slow(uint32_t value) __attribute__((noinline));
|
||||
|
||||
/**
|
||||
* @brief Calculates the size in bytes needed to encode a uint64_t value as a varint
|
||||
|
||||
Reference in New Issue
Block a user