From: myun2 Date: Tue, 12 Jun 2012 08:07:58 +0000 (+0900) Subject: fixed_ptr X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=1cb8ff82196fe3e34a0275ea5892d59d5202f531;p=roast%2Froast.git fixed_ptr --- diff --git a/roast/include/roast/lexical2/fixed.hpp b/roast/include/roast/lexical2/fixed.hpp index 4f78238d..04b9ec32 100644 --- a/roast/include/roast/lexical2/fixed.hpp +++ b/roast/include/roast/lexical2/fixed.hpp @@ -59,11 +59,10 @@ namespace roast const T* p = data; for(unsigned int i=length; i!=0; i--, p++, it++) { - bool ret = (*it == data); - if ( ret ) - it++; + if ( *it != data ) + return false; } - return ret; + return true; } //----