Use a simple counting instead, beecause Coverity complains that rand()
is not safe, and counting is siimpler anyway.
return branch_;
}
+static int list_id_generator = 0;
+
+BranchList::BranchList()
+ : separator_(from_ascii("|")), id_(++list_id_generator) {}
+
void Branch::setBranch(docstring const & s)
{
#include "support/docstring.h"
-#include <cstdlib> // rand()
#include <list>
typedef List::const_iterator const_iterator;
///
- BranchList() : separator_(from_ascii("|")), id_(rand()) {}
+ BranchList();
///
docstring separator() const { return separator_; }