Skip to content

Commit a682368

Browse files
committed
Removing _numProperties which isn't really required
1 parent 419fd32 commit a682368

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/property/PropertyContainer.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@
3030
******************************************************************************/
3131

3232
PropertyContainer::PropertyContainer()
33-
: _numProperties{0}
34-
, _numPrimitivesProperties{0}
33+
: _numPrimitivesProperties{0}
3534
, _get_time_func{nullptr}
3635
{
3736

@@ -56,7 +55,6 @@ Property & PropertyContainer::addPropertyReal(Property & property, String const
5655
property.init(name, permission, _get_time_func);
5756

5857
if (property.isPrimitive()) { _numPrimitivesProperties++; }
59-
_numProperties++;
6058
addProperty(&property, propertyIdentifier);
6159
return property;
6260
}
@@ -155,7 +153,7 @@ void PropertyContainer::addProperty(Property * property_obj, int propertyIdentif
155153
/* If property identifier is -1, an incremental value will be assigned as identifier. */
156154
else
157155
{
158-
property_obj->setIdentifier(_numProperties);
156+
property_obj->setIdentifier(_property_list.size() + 1); /* This is in order to stay compatible to the old system of first increasing _numProperties and then assigning it here. */
159157
}
160158
_property_list.push_back(property_obj);
161159
}

src/property/PropertyContainer.h

-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ class PropertyContainer
5858

5959
private:
6060

61-
int _numProperties;
6261
int _numPrimitivesProperties;
6362
GetTimeCallbackFunc _get_time_func;
6463
std::list<Property *> _property_list;

0 commit comments

Comments
 (0)