aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/common/chunk_file.h
diff options
context:
space:
mode:
authorGravatar archshift <admin@archshift.com>2015-01-20 17:16:47 -0800
committerGravatar archshift <admin@archshift.com>2015-02-10 18:30:31 -0800
commitef24e72b2618806f64345544fa46c84f3f494890 (patch)
treefca138e8377c4d66bd1fe026a3d2fef54a7f090c /src/common/chunk_file.h
parent168eb27aee7992b8abf9f505b8c246a25fc8dca5 (diff)
Asserts: break/crash program, fit to style guide; log.h->assert.h
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time) As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing) Also removed some GEKKO cruft.
Diffstat (limited to 'src/common/chunk_file.h')
-rw-r--r--src/common/chunk_file.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/common/chunk_file.h b/src/common/chunk_file.h
index 39a14dc8..dc27da08 100644
--- a/src/common/chunk_file.h
+++ b/src/common/chunk_file.h
@@ -180,7 +180,7 @@ public:
case MODE_MEASURE: break; // MODE_MEASURE - don't need to do anything
case MODE_VERIFY:
for (int i = 0; i < size; i++) {
- _dbg_assert_msg_(Common, ((u8*)data)[i] == (*ptr)[i],
+ DEBUG_ASSERT_MSG(((u8*)data)[i] == (*ptr)[i],
"Savestate verification failure: %d (0x%X) (at %p) != %d (0x%X) (at %p).\n",
((u8*)data)[i], ((u8*)data)[i], &((u8*)data)[i],
(*ptr)[i], (*ptr)[i], &(*ptr)[i]);
@@ -200,7 +200,7 @@ public:
case MODE_MEASURE: break; // MODE_MEASURE - don't need to do anything
case MODE_VERIFY:
for (int i = 0; i < size; i++) {
- _dbg_assert_msg_(Common, ((u8*)data)[i] == (*ptr)[i],
+ DEBUG_ASSERT_MSG(((u8*)data)[i] == (*ptr)[i],
"Savestate verification failure: %d (0x%X) (at %p) != %d (0x%X) (at %p).\n",
((u8*)data)[i], ((u8*)data)[i], &((u8*)data)[i],
(*ptr)[i], (*ptr)[i], &(*ptr)[i]);
@@ -505,8 +505,7 @@ public:
case MODE_WRITE: memcpy(*ptr, x.c_str(), stringLen); break;
case MODE_MEASURE: break;
case MODE_VERIFY:
- _dbg_assert_msg_(Common,
- !strcmp(x.c_str(), (char*)*ptr),
+ DEBUG_ASSERT_MSG((x == (char*)*ptr),
"Savestate verification failure: \"%s\" != \"%s\" (at %p).\n",
x.c_str(), (char*)*ptr, ptr);
break;
@@ -524,7 +523,7 @@ public:
case MODE_WRITE: memcpy(*ptr, x.c_str(), stringLen); break;
case MODE_MEASURE: break;
case MODE_VERIFY:
- _dbg_assert_msg_(Common, x == (wchar_t*)*ptr,
+ DEBUG_ASSERT_MSG((x == (wchar_t*)*ptr),
"Savestate verification failure: \"%ls\" != \"%ls\" (at %p).\n",
x.c_str(), (wchar_t*)*ptr, ptr);
break;