From 63ba02862544f171d78fa6d5294ecbf8068698c5 Mon Sep 17 00:00:00 2001
From: Emmanuel Christophe <emmanuel.christophe@orfeo-toolbox.org>
Date: Sun, 22 Aug 2010 00:31:29 +0800
Subject: [PATCH] WRG: fix 2^n warning

---
 Code/IO/otbMapFileProductWriter.txx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Code/IO/otbMapFileProductWriter.txx b/Code/IO/otbMapFileProductWriter.txx
index d306fc0bf0..c76b5aba2a 100644
--- a/Code/IO/otbMapFileProductWriter.txx
+++ b/Code/IO/otbMapFileProductWriter.txx
@@ -213,7 +213,8 @@ MapFileProductWriter<TInputImage>
     m_CurrentDepth = depth;
 
     // Resample image to the max Depth
-    int sampleRatioValue = static_cast<int>(vcl_pow(2., (maxDepth - depth)));
+//    int sampleRatioValue = static_cast<int>(vcl_pow(2., (maxDepth - depth)));
+    int sampleRatioValue = 1 << (maxDepth - depth); // 2^(maxDepth - depth)
 
     if (sampleRatioValue > 1)
       {
-- 
GitLab