@@ -41,30 +41,30 @@ class MatterEndPoint {
41
41
esp_matter::attribute_t *getAttribute (uint32_t cluster_id, uint32_t attribute_id) {
42
42
if (endpoint_id == 0 ) {
43
43
log_e (" Endpoint ID is not set" );
44
- return NULL ;
44
+ return nullptr ;
45
45
}
46
46
endpoint_t *endpoint = endpoint::get (node::get (), endpoint_id);
47
- if (endpoint == NULL ) {
47
+ if (endpoint == nullptr ) {
48
48
log_e (" Endpoint [%d] not found" , endpoint_id);
49
- return NULL ;
49
+ return nullptr ;
50
50
}
51
51
cluster_t *cluster = cluster::get (endpoint, cluster_id);
52
- if (cluster == NULL ) {
52
+ if (cluster == nullptr ) {
53
53
log_e (" Cluster [%d] not found" , cluster_id);
54
- return NULL ;
54
+ return nullptr ;
55
55
}
56
56
esp_matter::attribute_t *attribute = attribute::get (cluster, attribute_id);
57
- if (attribute == NULL ) {
57
+ if (attribute == nullptr ) {
58
58
log_e (" Attribute [%d] not found" , attribute_id);
59
- return NULL ;
59
+ return nullptr ;
60
60
}
61
61
return attribute;
62
62
}
63
63
64
64
// get the value of an attribute from its cluster id and attribute it
65
65
bool getAttributeVal (uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *attrVal) {
66
66
esp_matter::attribute_t *attribute = getAttribute (cluster_id, attribute_id);
67
- if (attribute == NULL ) {
67
+ if (attribute == nullptr ) {
68
68
return false ;
69
69
}
70
70
if (attribute::get_val (attribute, attrVal) == ESP_OK) {
@@ -78,7 +78,7 @@ class MatterEndPoint {
78
78
// set the value of an attribute from its cluster id and attribute it
79
79
bool setAttributeVal (uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *attrVal) {
80
80
esp_matter::attribute_t *attribute = getAttribute (cluster_id, attribute_id);
81
- if (attribute == NULL ) {
81
+ if (attribute == nullptr ) {
82
82
return false ;
83
83
}
84
84
if (attribute::set_val (attribute, attrVal) == ESP_OK) {
@@ -117,6 +117,6 @@ class MatterEndPoint {
117
117
118
118
protected:
119
119
uint16_t endpoint_id = 0 ;
120
- EndPointIdentifyCB _onEndPointIdentifyCB = NULL ;
120
+ EndPointIdentifyCB _onEndPointIdentifyCB = nullptr ;
121
121
};
122
122
#endif /* CONFIG_ESP_MATTER_ENABLE_DATA_MODEL */
0 commit comments