I can't seem to pinpoint the cause

This commit is contained in:
Kayne Ruse
2015-04-26 03:11:00 +10:00
parent 7aeabf0d14
commit 63e4394583
9 changed files with 83 additions and 26 deletions
+6
View File
@@ -21,6 +21,8 @@
*/
#include "region_pager_base.hpp"
#include "region_checksum.hpp"
#include <stdexcept>
#include <algorithm>
@@ -70,7 +72,11 @@ 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())) {
throw(std::runtime_error("Checksum fail; RegionPagerBase::PushRegion()"));
}
return &regionList.front();
}