From e5185eaefcdece7624b1fc2b1014e07c8bf18bbc Mon Sep 17 00:00:00 2001
From: Kasper Marstal <kaspermarstal@gmail.com>
Date: Tue, 25 Aug 2015 15:20:45 +0200
Subject: [PATCH] ENH: ELASTIX-1 DataManager now return const strings instead
 of just strings

---
 Testing/CMakeLists.txt          |  3 +--
 Testing/Unit/elxDataManager.cxx |  7 ++++---
 Testing/Unit/elxDataManager.h   | 11 ++++++-----
 3 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/Testing/CMakeLists.txt b/Testing/CMakeLists.txt
index ea6d3697..9598ac8c 100644
--- a/Testing/CMakeLists.txt
+++ b/Testing/CMakeLists.txt
@@ -30,7 +30,7 @@ endforeach()
 ExternalData_Add_Target( ElastixData )
 
 # ---------------------------------------------------------------------
-# Setup GoogleTest
+# Add GoogleTest
 
 find_package( Git )
 if( NOT EXISTS "${CMAKE_SOURCE_DIR}/Testing/GoogleTest/.git" AND GIT_EXECUTABLE )
@@ -70,7 +70,6 @@ add_subdirectory( Unit )
 
 # Benchmarks
 option( ELASTIX_BUILD_BENCHMARKING "Enable building benchmarks." OFF )
-
 if( ${ELASTIX_BUILD_BENCHMARKING} )
 	add_subdirectory( Benchmark )
 endif()
diff --git a/Testing/Unit/elxDataManager.cxx b/Testing/Unit/elxDataManager.cxx
index d8da3292..6b7da8aa 100644
--- a/Testing/Unit/elxDataManager.cxx
+++ b/Testing/Unit/elxDataManager.cxx
@@ -1,9 +1,10 @@
 #ifndef __DataManager_cxx
 #define __DataManager_cxx
 
+#include <itkSimpleDataObjectDecorator.h>
 #include "elxDataManager.h"
 
-std::string
+const std::string
 DataManager
 ::GetInputFullPath( const std::string filename ) const 
 {
@@ -11,7 +12,7 @@ DataManager
   return path;
 }
 
-std::string
+const std::string
 DataManager
 ::GetOutputFullPath( const std::string filename ) const
 {
@@ -19,7 +20,7 @@ DataManager
   return path;
 }
 
-std::string
+const std::string
 DataManager
 ::GetBaselineFullPath( const std::string filename ) const
 {
diff --git a/Testing/Unit/elxDataManager.h b/Testing/Unit/elxDataManager.h
index fb826d04..fc85a65c 100644
--- a/Testing/Unit/elxDataManager.h
+++ b/Testing/Unit/elxDataManager.h
@@ -2,6 +2,7 @@
 #define __DataManager_h
 
 #include <string>
+#include <itkSimpleDataObjectDecorator.h>
 
 #include "elxMacro.h"
 #include "itkObjectFactory.h"
@@ -25,13 +26,13 @@ public:
   std::string GetOutputDirectory( void ) const { return this->m_OutputDirectory; };
   std::string GetBaselineDirectory( void ) const { return this->m_BaselineDirectory; };
 
-  std::string GetInputFullPath( const std::string filename ) const;
-  std::string GetOutputFullPath( const std::string filename ) const;
-  std::string GetBaselineFullPath( const std::string filename ) const;
+  const std::string GetInputFullPath( const std::string filename ) const;
+  const std::string GetOutputFullPath( const std::string filename ) const;
+  const std::string GetBaselineFullPath( const std::string filename ) const;
 
   std::string GetFolderSeparator() const
   {
-#ifdef WIN32
+#ifdef _WIN32
     return "\\";
 #else
     return "/";
@@ -40,7 +41,7 @@ public:
 
   std::string GetPathSeparator () const
   {
-#ifdef WIN32
+#ifdef _WIN32
     return ";";
 #else
     return ":";
-- 
GitLab