Skip to content

Commit b5f3a19

Browse files
committed
Remove Property::getAttributeName(...)
1 parent 6b44c92 commit b5f3a19

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

src/property/Property.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -354,13 +354,6 @@ void Property::setAttributeReal(String attributeName, std::function<void (CborMa
354354
});
355355
}
356356

357-
String Property::getAttributeName(String propertyName, char separator) {
358-
int colonPos;
359-
String attributeName = "";
360-
(colonPos = propertyName.indexOf(separator)) != -1 ? attributeName = propertyName.substring(colonPos + 1) : "";
361-
return attributeName;
362-
}
363-
364357
void Property::updateLocalTimestamp() {
365358
if (isReadableByCloud()) {
366359
if (_get_time_func) {

src/property/Property.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ class Property
204204
void setAttributeReal(unsigned int& value, String attributeName = "");
205205
void setAttributeReal(float& value, String attributeName = "");
206206
void setAttributeReal(String& value, String attributeName = "");
207-
String getAttributeName(String propertyName, char separator);
208207

209208
virtual bool isDifferentFromCloud() = 0;
210209
virtual void fromCloudToLocal() = 0;

src/property/types/automation/CloudDimmedLight.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ class CloudDimmedLight : public Property {
104104
// Start
105105
float hue = 0;
106106
float sat = 0;
107-
CHECK_CBOR_MULTI(appendAttributeReal(hue, getAttributeName(".hue", '.'), encoder));
108-
CHECK_CBOR_MULTI(appendAttributeReal(sat, getAttributeName(".sat", '.'), encoder));
107+
CHECK_CBOR_MULTI(appendAttributeReal(hue, "hue", encoder));
108+
CHECK_CBOR_MULTI(appendAttributeReal(sat, "sat", encoder));
109109
CHECK_CBOR_MULTI(appendAttributeReal(_value.bri, "bri", encoder));
110110
// should be only:
111111
// appendAttribute(_value.bri);

0 commit comments

Comments
 (0)