]> Creatis software - crea.git/commitdiff
Pass std::string as reference
authorjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Thu, 1 Apr 2010 11:05:21 +0000 (11:05 +0000)
committerjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Thu, 1 Apr 2010 11:05:21 +0000 (11:05 +0000)
src/creaSystem.cxx
src/creaSystem.h

index 7060109e434f87863f3ceb596a8ff3b0732c7198..69293a982369586e718dd76c6bfe73a4062a7ea4 100644 (file)
@@ -44,8 +44,6 @@ namespace crea
    }
 #endif
 
-
-
 int System::GetAppPath(char *pname, size_t pathsize)
    {
 #ifdef LINUX   
@@ -166,10 +164,9 @@ int System::GetAppPath(char *pname, size_t pathsize)
 #endif /* MACOSX */
     
     return -1; /* Path Lookup Failed */
-} 
-
+}
 
-std::string System::GetDllAppPath(std::string nomdll){
+std::string System::GetDllAppPath(std::string &nomdll){
        std::string path = ".";
 #ifdef WIN32
        char currentPath[_MAX_PATH];
@@ -183,8 +180,6 @@ std::string System::GetDllAppPath(std::string nomdll){
        return path;
 }
 
-
-       
 #if defined(_WIN32)
 #define CREACONTOUR_VALID_FILE_SEPARATOR_CHAR '\\'
 #else
@@ -201,7 +196,7 @@ std::string System::GetExecutablePath(){
                        printf("Could not determine current executable path ?  ");  
                }    
                // remove the exe name
-               char *slash;            
+               char *slash;
                slash = strrchr(name, CREACONTOUR_VALID_FILE_SEPARATOR_CHAR);
                if (slash)
                {
@@ -209,7 +204,5 @@ std::string System::GetExecutablePath(){
                }
                return name;
        }
-       
-       
-       
+
 } // namespace crea
index f16ccbcea09d91b0c5a22405f8b5111f2878f449..3e1142b63d2ca1b9e37935ce215ecdb71afa4e51 100644 (file)
@@ -3,8 +3,8 @@
   Program:   crea
   Module:    $RCSfile: creaSystem.h,v $
   Language:  C++
-  Date:      $Date: 2010/03/22 19:11:47 $
-  Version:   $Revision: 1.9 $
+  Date:      $Date: 2010/04/01 11:05:21 $
+  Version:   $Revision: 1.10 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -28,8 +28,6 @@
 // We try for Visual 6..????
 //#pragma warning( disable : 4786)
 
-
-
 //-----------------------------------------------------------------------------
 //This is needed when compiling in debug mode
 #ifdef _MSC_VER
 */
 //-----------------------------------------------------------------------------
 
-
-
-
 //-----------------------------------------------------------------------------
 // Version
 #include <string.h>
@@ -160,9 +155,6 @@ namespace crea
 }
 //-----------------------------------------------------------------------------
 
-
-
-
 //-----------------------------------------------------------------------------
 /*
 #ifdef _WIN32
@@ -225,7 +217,7 @@ namespace crea
     /// returns true iff the program has a tty
     static int HasTTY(); 
        CREA_EXPORT static int GetAppPath(char *pname, size_t pathsize);
-       CREA_EXPORT static std::string GetDllAppPath(std::string nomdll);
+       CREA_EXPORT static std::string GetDllAppPath(std::string &nomdll);
     CREA_EXPORT static std::string GetExecutablePath();
 
   };