diff --git a/BPTCEncoder/src/BC7Compressor.cpp b/BPTCEncoder/src/BC7Compressor.cpp index a5f0e86..8a2a4f0 100755 --- a/BPTCEncoder/src/BC7Compressor.cpp +++ b/BPTCEncoder/src/BC7Compressor.cpp @@ -98,6 +98,8 @@ #include #include #include +#include +#include // #define USE_PCA_FOR_SHAPE_ESTIMATION @@ -1555,7 +1557,9 @@ namespace BC7C { template std::ostream &operator<<(const BlockLogger &bl, const T &v) { - return bl.m_Stream << bl.m_BlockIdx << ": " << v; + std::stringstream ss; + ss << bl.m_BlockIdx << ": " << v; + return bl.m_Stream << ss.str(); } // Function prototypes @@ -2223,7 +2227,9 @@ namespace BC7C { template static void PrintStat(const BlockLogger &lgr, const char *stat, const T &v) { - lgr << stat << " -- " << v << std::endl; + std::stringstream ss; + ss << stat << " -- " << v << std::endl; + lgr << ss.str(); } // Compress a single block but collect statistics as well...