30
30
******************************************************************************/
31
31
32
32
PropertyContainer::PropertyContainer ()
33
- : _numPrimitivesProperties{0 }
34
- , _get_time_func{nullptr }
33
+ : _get_time_func{nullptr }
35
34
{
36
35
37
36
}
@@ -54,7 +53,6 @@ Property & PropertyContainer::addPropertyReal(Property & property, String const
54
53
/* Initialize property and add it to the container */
55
54
property.init (name, permission, _get_time_func);
56
55
57
- if (property.isPrimitive ()) { _numPrimitivesProperties++; }
58
56
addProperty (&property, propertyIdentifier);
59
57
return property;
60
58
}
@@ -125,19 +123,16 @@ void PropertyContainer::updateTimestampOnLocallyChangedProperties()
125
123
/* This function updates the timestamps on the primitive properties
126
124
* that have been modified locally since last cloud synchronization
127
125
*/
128
- if (_numPrimitivesProperties > 0 )
129
- {
130
- std::for_each (_property_list.begin (),
131
- _property_list.end (),
132
- [](Property * p)
126
+ std::for_each (_property_list.begin (),
127
+ _property_list.end (),
128
+ [](Property * p)
129
+ {
130
+ CloudWrapperBase * pbase = reinterpret_cast <CloudWrapperBase *>(p);
131
+ if (pbase->isPrimitive () && pbase->isChangedLocally () && pbase->isReadableByCloud ())
133
132
{
134
- CloudWrapperBase * pbase = reinterpret_cast <CloudWrapperBase *>(p);
135
- if (pbase->isPrimitive () && pbase->isChangedLocally () && pbase->isReadableByCloud ())
136
- {
137
- p->updateLocalTimestamp ();
138
- }
139
- });
140
- }
133
+ p->updateLocalTimestamp ();
134
+ }
135
+ });
141
136
}
142
137
143
138
/* *****************************************************************************
0 commit comments