mirror of
https://github.com/esphome/esphome.git
synced 2025-10-23 20:23:50 +01:00
protect
This commit is contained in:
@@ -186,7 +186,7 @@ template<typename... Ts> class HomeAssistantServiceCallAction : public Action<Ts
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Helper to add key-value pairs to FixedVectors with perfect forwarding to avoid copies
|
// Helper to add key-value pairs to FixedVectors with perfect forwarding to avoid copies
|
||||||
template<typename K, typename V> void add_kv(FixedVector<TemplatableKeyValuePair<Ts...>> &vec, K &&key, V &&value) {
|
template<typename K, typename V> void add_kv_(FixedVector<TemplatableKeyValuePair<Ts...>> &vec, K &&key, V &&value) {
|
||||||
auto &kv = vec.emplace_back();
|
auto &kv = vec.emplace_back();
|
||||||
kv.key = std::forward<K>(key);
|
kv.key = std::forward<K>(key);
|
||||||
kv.value = std::forward<V>(value);
|
kv.value = std::forward<V>(value);
|
||||||
|
Reference in New Issue
Block a user