ProbabDistrib: fixed definition string parsing with nonzero start
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1281 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
parent
84a6a3d968
commit
3844523882
@ -31,10 +31,11 @@ void cProbabDistrib::SetPoints(const cProbabDistrib::cPoints & a_Points)
|
||||
m_Cumulative.reserve(a_Points.size() + 1);
|
||||
int ProbSum = 0;
|
||||
int LastProb = 0;
|
||||
int LastValue = 0;
|
||||
int LastValue = -1;
|
||||
if (a_Points[0].m_Value != 0)
|
||||
{
|
||||
m_Cumulative.push_back(cPoint(0, 0)); // Always push in the [0, 0] point for easier search algorithm bounds
|
||||
LastValue = 0;
|
||||
}
|
||||
for (cPoints::const_iterator itr = a_Points.begin(), end = a_Points.end(); itr != end; ++itr)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user