Streamline StatEntity
- define a (private)
struct se
to keep all data, so that theStatEntity
copy constructor and assignment can use the compiler generated copy constructor and assignment operator ofse
. - prefer direct member initialization, make default constructor
= default
, and implementreset()
in terms of assignment of default constructedstruct se
tom_se
(instead of implementing the default constructor in terms ofreset()
). - fix deadlock between
add()
andreset()
which is triggered (eventually) iffsetnEntriesBeforeReset
is called with a non-negative value - move binary operators out of global namespace, use friend functions inside of class scope instead.
- implement
toString
as friend instead of member - prefer static_assert overt boost static_assert
- remove redundant destructor definition
Edited by Gerhard Raven