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:
J. Nick Koston
2026-03-07 15:31:33 -10:00
co-authored by Claude Opus 4.6
parent 244e672b0a
commit 44b50055af
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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