mirror of
https://github.com/esphome/esphome.git
synced 2026-09-17 10:08:40 +00:00
Move varint_slow to private
It has a precondition (value >= 128) and should not be callable from outside the class. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
a5780eec54
commit
8ae54656fc
@@ -518,10 +518,10 @@ class ProtoSize {
|
||||
return varint_wide(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));
|
||||
|
||||
private:
|
||||
// Slow path for varint >= 128, outlined to keep fast path small
|
||||
static uint32_t varint_slow(uint32_t value) __attribute__((noinline));
|
||||
// Shared cascade for values >= 128 (used by both constexpr and noinline paths)
|
||||
static constexpr inline uint32_t ESPHOME_ALWAYS_INLINE varint_wide(uint32_t value) {
|
||||
if (value < 16384)
|
||||
|
||||
Reference in New Issue
Block a user