inlined stack pointer retrieval to silence compiler warning

master
Marius Kintel 2014-11-25 15:06:20 -05:00
parent 2644b19ce7
commit 32bc6ae516
2 changed files with 4 additions and 4 deletions

View File

@ -15,12 +15,14 @@ StackCheck::~StackCheck()
void StackCheck::init()
{
ptr = sp();
unsigned char c;
ptr = &c;
}
unsigned long StackCheck::size()
{
return std::labs(ptr - sp());
unsigned char c;
return std::labs(ptr - &c);
}
bool StackCheck::check()

View File

@ -13,8 +13,6 @@ public:
unsigned long size();
private:
unsigned char * sp() { unsigned char c; return &c; };
unsigned char * ptr;
static StackCheck *self;