unichar Iso646Fi::Decoder::decode_char(const string &str, string::const_iterator &i)
{
if(i==str.end())
- return error("No input");
+ return -1;
unsigned char ch = *i;
- int tch = (ch<=0x7F ? transform_mapping_or_direct(mapping, map_size, ch, true) : -1);
-
unichar result;
- if(tch==-1)
+ if(ch>=0x80)
result = error("Undefined ISO-646-FI character");
else
- result = tch;
+ result = transform_mapping_or_direct(mapping, map_size, ch, true);
++i;
return result;