Inferno
0.2
|
00001 #ifndef MAGIC_HPP 00002 #define MAGIC_HPP 00003 00004 // Magic number checks for memory corruption 00005 00006 class Magic 00007 { 00008 unsigned magic; 00009 public: 00010 Magic() : 00011 magic(0x12343210) 00012 { 00013 } 00014 00015 ~Magic() 00016 { 00017 ASSERT(magic==0x12343210)("magic number check failed"); 00018 magic = 0xde1e7ed; 00019 } 00020 }; 00021 00022 #endif