mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-09 18:49:22 +00:00
Add constructor/destructor to stats_manager
This ensures m_total is properly initialized. Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
This commit is contained in:
@@ -19,6 +19,16 @@ limitations under the License.
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
stats_manager::stats_manager()
|
||||||
|
: m_total(0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
stats_manager::~stats_manager()
|
||||||
|
{
|
||||||
|
clear();
|
||||||
|
}
|
||||||
|
|
||||||
void stats_manager::clear()
|
void stats_manager::clear()
|
||||||
{
|
{
|
||||||
m_total = 0;
|
m_total = 0;
|
||||||
|
@@ -27,6 +27,9 @@ limitations under the License.
|
|||||||
class stats_manager
|
class stats_manager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
stats_manager();
|
||||||
|
virtual ~stats_manager();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\brief Erases the internal state and statistics data
|
\brief Erases the internal state and statistics data
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user