bool BmpLoader::detect(const std::string &sig)
{
- static const char bmp_sig[] = "BM";
+ static const char bmp_sig[] = { 'B', 'M' };
if(sig.size()<sizeof(bmp_sig))
return false;
- return !sig.compare(0, 2, bmp_sig);
+ return !sig.compare(0, sizeof(bmp_sig), bmp_sig, sizeof(bmp_sig));
}
void BmpLoader::load(Image::Data &data)