]> git.cworth.org Git - apitrace/blobdiff - common/trace_file_snappy.cpp
retrace: Implement glxCopySubBufferMESA
[apitrace] / common / trace_file_snappy.cpp
index f47c89b046c37fe282478a9ca6a014bb108df553..41d86ea00ded834e33dadd3a3ca65c5d5ef7da63 100644 (file)
@@ -54,6 +54,7 @@
 #include <snappy.h>
 
 #include <iostream>
+#include <algorithm>
 
 #include <assert.h>
 #include <string.h>
@@ -397,7 +398,7 @@ bool SnappyFile::rawSkip(size_t length)
 
 int SnappyFile::rawPercentRead()
 {
-    return 100 * (double(m_stream.tellg()) / double(m_endPos));
+    return int(100 * (double(m_stream.tellg()) / double(m_endPos)));
 }