Looking for the bug

This commit is contained in:
Kayne Ruse
2015-04-27 01:33:57 +10:00
parent 2a1ee4acbf
commit 878d502b8b
10 changed files with 28 additions and 98 deletions
+3 -5
View File
@@ -21,8 +21,6 @@
*/
#include "region_pager_base.hpp"
#include "region_checksum.hpp"
#include <stdexcept>
#include <algorithm>
@@ -74,9 +72,9 @@ Region* RegionPagerBase::FindRegion(int x, int y) {
Region* RegionPagerBase::PushRegion(Region* const ptr) {
//BUG: Lists seem to not work properly
regionList.push_front(*ptr);
if (debugRegionSum(&regionList.front()) == 0) {
throw(std::runtime_error("Checksum fail; RegionPagerBase::PushRegion()"));
}
// if (debugRegionSum(&regionList.front()) == 0) {
// throw(std::runtime_error("Checksum fail; RegionPagerBase::PushRegion()"));
// }
return &regionList.front();
}