Browse Source

TgaImporter: use better-defined type.

Commit mosra/corrade@9485ef7effd6c8241e03982c53e8fabfe260b525 broke
this, apparently the compiler can't decide which overload to select when
a type has implicit conversion to another type which is then supported
by both Debug and std::ostream operator<<. Working around this for now as
it is the only case, hopefully we won't run into something similar later.
pull/55/merge
Vladimír Vondruš 12 years ago
parent
commit
23dd34e0f4
  1. 4
      src/MagnumPlugins/TgaImporter/TgaImporter.cpp

4
src/MagnumPlugins/TgaImporter/TgaImporter.cpp

@ -79,9 +79,9 @@ UnsignedInt TgaImporter::doImage2DCount() const { return 1; }
std::optional<ImageData2D> TgaImporter::doImage2D(UnsignedInt) {
/* Check if the file is long enough */
in->seekg(0, std::istream::end);
std::streampos filesize = in->tellg();
std::streamoff filesize = in->tellg();
in->seekg(0, std::istream::beg);
if(filesize < std::streampos(sizeof(TgaHeader))) {
if(filesize < std::streamoff(sizeof(TgaHeader))) {
Error() << "Trade::TgaImporter::image2D(): the file is too short:" << filesize << "bytes";
return std::nullopt;
}

Loading…
Cancel
Save