3030 ******************************************************************************/
3131
3232PropertyContainer::PropertyContainer ()
33- : _numPrimitivesProperties{0 }
34- , _get_time_func{nullptr }
33+ : _get_time_func{nullptr }
3534{
3635
3736}
@@ -54,7 +53,6 @@ Property & PropertyContainer::addPropertyReal(Property & property, String const
5453 /* Initialize property and add it to the container */
5554 property.init (name, permission, _get_time_func);
5655
57- if (property.isPrimitive ()) { _numPrimitivesProperties++; }
5856 addProperty (&property, propertyIdentifier);
5957 return property;
6058}
@@ -125,19 +123,16 @@ void PropertyContainer::updateTimestampOnLocallyChangedProperties()
125123 /* This function updates the timestamps on the primitive properties
126124 * that have been modified locally since last cloud synchronization
127125 */
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 ())
133132 {
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+ });
141136}
142137
143138/* *****************************************************************************
0 commit comments