mirror of
https://github.com/esphome/esphome.git
synced 2025-10-31 23:21:54 +00:00
safety
This commit is contained in:
@@ -284,8 +284,7 @@ class ClimateTraits {
|
|||||||
*
|
*
|
||||||
* Pointers must remain valid for the ClimateTraits lifetime. Safe patterns:
|
* Pointers must remain valid for the ClimateTraits lifetime. Safe patterns:
|
||||||
* - String literals: set_supported_custom_fan_modes({"Turbo", "Silent"})
|
* - String literals: set_supported_custom_fan_modes({"Turbo", "Silent"})
|
||||||
* - Static data: static const char* MODE = "Eco";
|
* - Static const data: static const char* MODE = "Eco";
|
||||||
* - Component members: Extract from long-lived std::map keys or member vectors
|
|
||||||
*
|
*
|
||||||
* Climate class setters validate pointers are from these vectors before storing.
|
* Climate class setters validate pointers are from these vectors before storing.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user