From 6f6fce5995c281cf8a57de032b071ce80f9ab5cf Mon Sep 17 00:00:00 2001
From: adrien-matta <a.matta@surrey.ac.uk>
Date: Thu, 30 Jan 2014 14:18:31 +0000
Subject: [PATCH] * Fix issue in Calibration manager   - Depending on the file
 format the last value of a calibration was     read twice   - Problem fixed
 by using while(file>>Databuffer) instead of     while(file.eof())

---
 NPLib/Tools/CalibrationManager.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/NPLib/Tools/CalibrationManager.cxx b/NPLib/Tools/CalibrationManager.cxx
index a03478b2a..315b8b999 100644
--- a/NPLib/Tools/CalibrationManager.cxx
+++ b/NPLib/Tools/CalibrationManager.cxx
@@ -178,8 +178,8 @@ void CalibrationManager::LoadParameterFromFile()
                     if( it!=fToken.end() )
                       { 
                           vector<double> Coeff ;
-                          while( !theLine.eof() ){
-                                theLine >> DataBuffer ; Coeff.push_back( atof(DataBuffer.c_str()) ) ;
+                          while( theLine >> DataBuffer ){
+                            Coeff.push_back( atof(DataBuffer.c_str()) ) ;
                           }
                          
                           //   Check this parameter is not already define
-- 
GitLab