{
T result = 0;
for(unsigned i=0; i<sizeof(T); ++i)
- result += static_cast<unsigned char>(*c++)<<i*8;
+ result += (*c++)<<i*8;
return result;
}
else
{
result += MATCH_MASK;
- result.append(reinterpret_cast<char *>(mask), 32);
+ result.append(mask, 32);
}
iter = end;
{
int c;
if(i!=str.end())
- c = static_cast<unsigned char>(*i);
+ c = *i;
else
c = -1;
string decompiled = disassemble_instruction(i);
string bytes;
for(; j!=i; ++j)
- bytes += format(" %02X", static_cast<int>(*j)&0xFF);
+ bytes += format(" %02X", *j);
result += format("%3d:%-9s ", offset, bytes);
if(bytes.size()>9)
result += "\n ";
return "MATCH_END";
case MATCH_CHAR:
{
- char c = *i++;
+ unsigned char c = *i++;
if(c>=0x20 && c<=0x7E)
return format("MATCH_CHAR '%c'", c);
else
- return format("MATCH_CHAR %d", static_cast<int>(c)&0xFF);
+ return format("MATCH_CHAR %d", c);
}
break;
case MATCH_RANGE:
{
int begin = *i++;
int end = *i++;
- return format("MATCH_RANGE %d-%d", begin&0xFF, end&0xFF);
+ return format("MATCH_RANGE %d-%d", begin, end);
}
case MATCH_MASK:
{
string result = "MATCH_MASK";
for(unsigned j=0; j<32; ++j)
- result += format(" %02X", static_cast<int>(*i++)&0xFF);
+ result += format(" %02X", *i++);
return result;
}
case MATCH_ANY: