simplifed cut
This commit is contained in:
parent
884a20eb44
commit
79109e1d34
@ -207,6 +207,8 @@ float capLogElements(vector<LogEntry>& log)
|
|||||||
if(log.back().PieceCollector[id].first < limit)
|
if(log.back().PieceCollector[id].first < limit)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
cut(log,id);//for debugging
|
||||||
|
return 0;//for debugging
|
||||||
int newid=0;
|
int newid=0;
|
||||||
//check if all over
|
//check if all over
|
||||||
if(id==log.back().PieceCollector.size())
|
if(id==log.back().PieceCollector.size())
|
||||||
@ -214,12 +216,6 @@ float capLogElements(vector<LogEntry>& log)
|
|||||||
if(id>0)
|
if(id>0)
|
||||||
newid = --id; //set to the one just over limit
|
newid = --id; //set to the one just over limit
|
||||||
|
|
||||||
else//this only for test
|
|
||||||
cut(log,newid);//this only for test
|
|
||||||
|
|
||||||
cut(log,++newid);//this only for test
|
|
||||||
return 1;//this only for test
|
|
||||||
|
|
||||||
while(id<(log.back().PieceCollector.size()-1)) //find maximum difference in function
|
while(id<(log.back().PieceCollector.size()-1)) //find maximum difference in function
|
||||||
{
|
{
|
||||||
if(!log.back().PieceCollector[id].first)
|
if(!log.back().PieceCollector[id].first)
|
||||||
|
Loading…
Reference in New Issue
Block a user