diff options
Diffstat (limited to 'x11-misc/fracplanet/files/fracplanet-0.4.0-gcc6.patch')
-rw-r--r-- | x11-misc/fracplanet/files/fracplanet-0.4.0-gcc6.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/x11-misc/fracplanet/files/fracplanet-0.4.0-gcc6.patch b/x11-misc/fracplanet/files/fracplanet-0.4.0-gcc6.patch new file mode 100644 index 000000000000..4d760d672f8d --- /dev/null +++ b/x11-misc/fracplanet/files/fracplanet-0.4.0-gcc6.patch @@ -0,0 +1,44 @@ +Description: Fix compilation with gcc-6 +Author: Gert Wollny <gw.fossdev@gmail.com> +Last-Updated: 2016-07-09 +Forwarded: No +Bug-Debian: https://bugs.debian.org/811642 + +--- fracplanet-0.4.0.orig/image.cpp ++++ fracplanet-0.4.0/image.cpp +@@ -85,7 +85,7 @@ template <> bool Raster<uchar>::write_pg + out.write(reinterpret_cast<const char*>(&(*(row->begin()))),row->size()); + } + out.close(); +- return out; ++ return out.good(); + } + + template <> bool Raster<ushort>::write_pgmfile(const std::string& filename,Progress* target) const +@@ -101,7 +101,7 @@ template <> bool Raster<ushort>::write_p + progress.step(); + for (const ushort* it=row->begin();it!=row->end();++it) + { +- const uchar p[2]={((*it)>>8),(*it)}; ++ const uchar p[2]={static_cast<uchar>((*it)>>8),static_cast<uchar>((*it) & 0x00FF)}; + if (m>=256) + { + // PGM spec is most significant byte first +@@ -115,7 +115,7 @@ template <> bool Raster<ushort>::write_p + } + } + out.close(); +- return out; ++ return out.good(); + } + + template <> bool Raster<ByteRGBA>::write_ppmfile(const std::string& filename,Progress* target) const +@@ -132,7 +132,7 @@ template <> bool Raster<ByteRGBA>::write + out.write(reinterpret_cast<const char*>(&((*it).r)),3); + } + out.close(); +- return out; ++ return out.good(); + } + + |