diff Plugin/DecodedImageAdapter.cpp @ 101:2932473a9b19 refactoring

fix prefetching
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 27 Nov 2015 22:05:51 +0100
parents 46ec13a1177c
children 21123729ac71
line wrap: on
line diff
--- a/Plugin/DecodedImageAdapter.cpp	Fri Nov 27 21:45:21 2015 +0100
+++ b/Plugin/DecodedImageAdapter.cpp	Fri Nov 27 22:05:51 2015 +0100
@@ -48,8 +48,6 @@
       return false;
     }
 
-    printf("[%s] [%s] [%s]\n", what[1].str().c_str(), what[2].str().c_str(), what[3].str().c_str());
-
     std::string compression(what[1]);
     instanceId = what[2];
     frameIndex = boost::lexical_cast<unsigned int>(what[3]);
@@ -334,7 +332,10 @@
         }
         else
         {
-          *q = static_cast<TargetType>(boost::math::iround(v));
+          //*q = static_cast<TargetType>(boost::math::iround(v));
+          
+          // http://stackoverflow.com/a/485546/881731
+          *q = static_cast<TargetType>(floor(v + 0.5f));
         }
       }
     }