J. Nick Koston
19e497cd61
Remove get_loop_component_start_time wrapper, use forward-declared App directly
...
The wrapper added a function call indirection on every filter invocation
that the compiler cannot inline without LTO. Forward-declaring Application
and App lets the template body call App.get_loop_component_start_time()
directly — the method is inline in application.h which is included by
main.cpp where the template is instantiated.
2026-03-27 16:58:49 -10:00
J. Nick Koston
5d67d16810
Merge remote-tracking branch 'origin/callback-manager-no-vector' into callback-manager-no-vector
2026-03-27 16:50:59 -10:00
J. Nick Koston
d25a70b830
Merge remote-tracking branch 'upstream/dev' into callback-manager-no-vector
2026-03-27 16:50:46 -10:00
J. Nick Koston
fa2b14ef41
Guard against nullptr+0 UB in call() and fix assert bound
...
- Add early return when size_==0 to avoid nullptr+0 pointer
arithmetic (UB per C++ standard, even though all ESPHome
targets treat it as no-op)
- Fix debug assert: size < UINT16_MAX allows capacity up to 65535
2026-03-27 16:47:56 -10:00
J. Nick Koston
967ded5477
Add ESPHOME_ALWAYS_INLINE to call() to stabilize inlining across struct layout changes
2026-03-27 16:40:59 -10:00
J. Nick Koston
711ba55756
Fix: inline ESPHOME_DEBUG_ASSERT to avoid include order issue
2026-03-27 16:27:52 -10:00
J. Nick Koston
4cba679469
Fix: inline ESPHOME_DEBUG_ASSERT to avoid include order issue
2026-03-27 16:27:50 -10:00
J. Nick Koston
327d0597af
Fix: inline ESPHOME_DEBUG_ASSERT to avoid include order issue
2026-03-27 16:27:48 -10:00
J. Nick Koston
5d7ae5b3ce
Fix: inline ESPHOME_DEBUG_ASSERT to avoid include order issue
2026-03-27 16:27:46 -10:00
J. Nick Koston
4eec3f5076
Fix: inline ESPHOME_DEBUG_ASSERT to avoid include order issue
2026-03-27 16:27:44 -10:00
J. Nick Koston
1a9c1d4844
Fix: inline ESPHOME_DEBUG_ASSERT to avoid include order issue
2026-03-27 16:27:42 -10:00
J. Nick Koston
1d8be72a44
Fix: inline ESPHOME_DEBUG_ASSERT to avoid include order issue
2026-03-27 16:27:40 -10:00
J. Nick Koston
fa6df8ea2a
Fix: inline ESPHOME_DEBUG_ASSERT to avoid include order issue
2026-03-27 16:27:38 -10:00
J. Nick Koston
3b01e65a2a
Remove accidentally committed .gitignore
2026-03-27 16:24:35 -10:00
J. Nick Koston
42fe39cfd9
Use pointer iteration in call() to avoid uint16_t movzx overhead on x86-64
2026-03-27 16:24:23 -10:00
Jonathan Swoboda
b6abfec82e
[core] Fix area/device hash collision validation not running ( #15259 )
2026-03-27 22:22:24 -04:00
J. Nick Koston
41f9ed7fda
Add braces to satisfy clang-tidy readability-braces-around-statements
2026-03-27 16:21:07 -10:00
J. Nick Koston
a360e43ee8
Fix MapFilter: use init_array_from (missed in merge)
2026-03-27 16:18:21 -10:00
J. Nick Koston
1b52a2f2b9
Merge remote-tracking branch 'upstream/text_sensor_substitute_static_array' into integration
2026-03-27 16:16:59 -10:00
J. Nick Koston
674cdd8be4
Merge remote-tracking branch 'upstream/binary_sensor_multiclick_static_array' into integration
2026-03-27 16:16:59 -10:00
J. Nick Koston
507500171f
Merge remote-tracking branch 'upstream/binary_sensor_autorepeat_static_array' into integration
2026-03-27 16:16:59 -10:00
J. Nick Koston
b4537fbd55
Merge remote-tracking branch 'upstream/sensor_calibrate_polynomial_static_array' into integration
2026-03-27 16:16:58 -10:00
J. Nick Koston
74471296d5
Merge remote-tracking branch 'upstream/sensor_calibrate_linear_static_array' into integration
2026-03-27 16:16:58 -10:00
J. Nick Koston
3e97425dce
Merge remote-tracking branch 'upstream/sensor_or_filter_static_array' into integration
2026-03-27 16:16:58 -10:00
J. Nick Koston
23cbee808a
Merge remote-tracking branch 'upstream/sensor_value_list_static_array' into integration
2026-03-27 16:16:58 -10:00
J. Nick Koston
7f5409214b
Use init_array_from helper for optimal codegen
...
Uses memcpy for trivially copyable types, element-wise copy otherwise.
ESPHOME_DEBUG_ASSERT catches size mismatches in integration tests.
2026-03-27 16:14:59 -10:00
J. Nick Koston
c4aed6f7e5
Use init_array_from helper for optimal codegen
...
Uses memcpy for trivially copyable types, element-wise copy otherwise.
ESPHOME_DEBUG_ASSERT catches size mismatches in integration tests.
2026-03-27 16:14:57 -10:00
J. Nick Koston
a20b0a96b9
Use init_array_from helper for optimal codegen
...
Uses memcpy for trivially copyable types, element-wise copy otherwise.
ESPHOME_DEBUG_ASSERT catches size mismatches in integration tests.
2026-03-27 16:14:55 -10:00
J. Nick Koston
8b42629e3e
Use init_array_from helper for optimal codegen
...
Uses memcpy for trivially copyable types, element-wise copy otherwise.
ESPHOME_DEBUG_ASSERT catches size mismatches in integration tests.
2026-03-27 16:14:53 -10:00
J. Nick Koston
ae2a82edd6
Use init_array_from helper for optimal codegen
...
Uses memcpy for trivially copyable types, element-wise copy otherwise.
ESPHOME_DEBUG_ASSERT catches size mismatches in integration tests.
2026-03-27 16:14:51 -10:00
J. Nick Koston
f8e144b23b
Use init_array_from helper for optimal codegen
...
Uses memcpy for trivially copyable types, element-wise copy otherwise.
ESPHOME_DEBUG_ASSERT catches size mismatches in integration tests.
2026-03-27 16:14:49 -10:00
J. Nick Koston
1d2f11b990
Use init_array_from helper for optimal codegen
...
Uses memcpy for trivially copyable types, element-wise copy otherwise.
ESPHOME_DEBUG_ASSERT catches size mismatches in integration tests.
2026-03-27 16:14:47 -10:00
J. Nick Koston
494d431bf8
Use init_array_from helper for optimal codegen
...
Uses memcpy for trivially copyable types, element-wise copy otherwise.
ESPHOME_DEBUG_ASSERT catches size mismatches in integration tests.
2026-03-27 16:14:45 -10:00
J. Nick Koston
3a3345ace4
Revert accidental FixedRingBuffer change — only CallbackManager should be affected
2026-03-27 16:03:06 -10:00
J. Nick Koston
acef5ad5bb
Fix off-by-one in debug assert: size + 1 must also fit in uint16_t
2026-03-27 15:59:01 -10:00
J. Nick Koston
c2c34d39e7
[text_sensor] Assert size before writing, not after
2026-03-27 15:55:56 -10:00
J. Nick Koston
787af59845
[text_sensor] Assert size before writing, not after
2026-03-27 15:55:29 -10:00
J. Nick Koston
3e7dcc6490
[binary_sensor] Assert size before writing, not after
2026-03-27 15:54:44 -10:00
J. Nick Koston
f48eff29c3
Fix ::operator new / delete[] mismatch — use ::operator delete to match
2026-03-27 15:54:40 -10:00
J. Nick Koston
f9c2d60b7d
[binary_sensor] Assert size before writing, not after
2026-03-27 15:54:12 -10:00
J. Nick Koston
fe8e7c134c
Add debug assert for uint16_t overflow in callback_manager_grow
2026-03-27 15:53:47 -10:00
J. Nick Koston
55963a6ea0
[sensor] Assert size before writing, not after
2026-03-27 15:53:18 -10:00
J. Nick Koston
1bdf6402a2
Move grow path to helpers.cpp as non-template function
...
Since Callback is trivially copyable regardless of signature,
the grow logic is type-independent. Move it to a concrete
function in helpers.cpp using void*/memcpy, eliminating the
template definition from the header entirely.
2026-03-27 15:52:33 -10:00
J. Nick Koston
4cb1164a01
[sensor] Assert size before writing, not after
2026-03-27 15:52:16 -10:00
J. Nick Koston
3d68920de0
[sensor] Assert size before writing, not after
2026-03-27 15:51:05 -10:00
J. Nick Koston
70a9c2f8b6
[sensor] Assert size before writing, not after
2026-03-27 15:49:57 -10:00
J. Nick Koston
29b5b3eba1
Move CallbackManager growth path out-of-line
...
Split add_() into inline fast path (size check + store) and
noinline cold grow_() for the allocation/memcpy/delete path.
Prevents the cold growth code from bloating every call site.
2026-03-27 15:48:52 -10:00
J. Nick Koston
a28f331f73
[text_sensor] Replace truncation guard with ESPHOME_DEBUG_ASSERT
2026-03-27 15:48:10 -10:00
J. Nick Koston
f47799a645
[text_sensor] Replace truncation guard with ESPHOME_DEBUG_ASSERT
2026-03-27 15:48:09 -10:00
J. Nick Koston
869bafe338
[binary_sensor] Replace truncation guard with ESPHOME_DEBUG_ASSERT
2026-03-27 15:48:07 -10:00