From e86ba13365968ca234e9c79894279cd04af0c71d Mon Sep 17 00:00:00 2001
From: Emmanuel Christophe <emmanuel.christophe@orfeo-toolbox.org>
Date: Thu, 2 Apr 2009 16:40:46 +0800
Subject: [PATCH] ENH: pass parameter by reference

---
 Code/Projections/otbSensorModelBase.h   | 2 +-
 Code/Projections/otbSensorModelBase.txx | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/Code/Projections/otbSensorModelBase.h b/Code/Projections/otbSensorModelBase.h
index 88e089587b..9ffc6ac859 100644
--- a/Code/Projections/otbSensorModelBase.h
+++ b/Code/Projections/otbSensorModelBase.h
@@ -83,7 +83,7 @@ public :
   ossimProjection* GetOssimModel(void);
 
   /* Set the Imagekeywordlist and affect the ossim projection ( m_Model) */
-  virtual void SetImageGeometry(const ImageKeywordlist image_kwl);
+  virtual void SetImageGeometry(const ImageKeywordlist &image_kwl);
 
   /* Set the Imagekeywordlist and affect the ossim projection ( m_Model) */
   virtual void SetImageGeometry(const ossimKeywordlist &geom_kwl);
diff --git a/Code/Projections/otbSensorModelBase.txx b/Code/Projections/otbSensorModelBase.txx
index c77e84ce8f..96ad5cfcda 100644
--- a/Code/Projections/otbSensorModelBase.txx
+++ b/Code/Projections/otbSensorModelBase.txx
@@ -110,7 +110,7 @@ unsigned int NOutputDimensions,
 unsigned int NParametersDimensions >
 void
 SensorModelBase< TScalarType,NInputDimensions,NOutputDimensions,NParametersDimensions>
-::SetImageGeometry(const ImageKeywordlist image_kwl)
+::SetImageGeometry(const ImageKeywordlist & image_kwl)
 {
   m_ImageKeywordlist = image_kwl;
   CreateProjection(m_ImageKeywordlist);
@@ -145,7 +145,6 @@ SensorModelBase< TScalarType,NInputDimensions,NOutputDimensions,NParametersDimen
   image_kwl.convertToOSSIMKeywordlist(geom);
   otbMsgDevMacro(<< "CreateProjection(): ossimKeywordlist: " << geom);
 
-//   m_Model = ossimProjectionFactoryRegistry::instance()->createProjection(geom);
   m_Model = ossimSensorModelFactory::instance()->createProjection(geom);
   if ( m_Model == NULL)
   {
-- 
GitLab