DOM: Fixed ::count bug
This commit is contained in:
@@ -515,10 +515,8 @@ std::vector <std::string> DOM::decomposeReference (const std::string& reference)
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int DOM::count () const
|
int DOM::count () const
|
||||||
{
|
{
|
||||||
// This branch.
|
|
||||||
int total = 1;
|
|
||||||
|
|
||||||
// Recurse and count the branches.
|
// Recurse and count the branches.
|
||||||
|
int total {0};
|
||||||
for (auto& i : _branches)
|
for (auto& i : _branches)
|
||||||
total += i->count ();
|
total += i->count ();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user