mirror of
https://github.com/esphome/esphome.git
synced 2025-10-28 05:33:53 +00:00
Activate some clang-tidy checks (#1884)
This commit is contained in:
@@ -8,15 +8,15 @@ namespace esphome {
|
||||
namespace switch_ {
|
||||
|
||||
#define LOG_SWITCH(prefix, type, obj) \
|
||||
if (obj != nullptr) { \
|
||||
ESP_LOGCONFIG(TAG, "%s%s '%s'", prefix, type, obj->get_name().c_str()); \
|
||||
if (!obj->get_icon().empty()) { \
|
||||
ESP_LOGCONFIG(TAG, "%s Icon: '%s'", prefix, obj->get_icon().c_str()); \
|
||||
if ((obj) != nullptr) { \
|
||||
ESP_LOGCONFIG(TAG, "%s%s '%s'", prefix, type, (obj)->get_name().c_str()); \
|
||||
if (!(obj)->get_icon().empty()) { \
|
||||
ESP_LOGCONFIG(TAG, "%s Icon: '%s'", prefix, (obj)->get_icon().c_str()); \
|
||||
} \
|
||||
if (obj->assumed_state()) { \
|
||||
if ((obj)->assumed_state()) { \
|
||||
ESP_LOGCONFIG(TAG, "%s Assumed State: YES", prefix); \
|
||||
} \
|
||||
if (obj->is_inverted()) { \
|
||||
if ((obj)->is_inverted()) { \
|
||||
ESP_LOGCONFIG(TAG, "%s Inverted: YES", prefix); \
|
||||
} \
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user