off by one in mean calculation in Graph

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@923 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-05-31 22:49:19 +00:00
parent 06016ac952
commit 11c1b7e4dc
+2 -1
View File
@@ -77,7 +77,7 @@ GraphData::GraphData(const GraphDataPre& d)
size_t left = counts.size();
int i = 0;
while (!counts.empty() && i < 100) {
String is = String() << i++;
String is = String() << i;
map<String,UInt>::const_iterator it = counts.find(is);
if (it == counts.end()) {
// not found, add a 0 bar
@@ -90,6 +90,7 @@ GraphData::GraphData(const GraphDataPre& d)
counts.erase(is);
left--;
}
i++;
}
a->mean /= a->total;
// drop empty tail