From 23dd34e0f445fbb2ba8e47d76f1c14284c918f80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 9 Jul 2014 22:52:24 +0200 Subject: [PATCH] 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. --- src/MagnumPlugins/TgaImporter/TgaImporter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MagnumPlugins/TgaImporter/TgaImporter.cpp b/src/MagnumPlugins/TgaImporter/TgaImporter.cpp index 9c4fd161c..28d6d311d 100644 --- a/src/MagnumPlugins/TgaImporter/TgaImporter.cpp +++ b/src/MagnumPlugins/TgaImporter/TgaImporter.cpp @@ -79,9 +79,9 @@ UnsignedInt TgaImporter::doImage2DCount() const { return 1; } std::optional 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; }