Program: gdcm
Module: $RCSfile: gdcmUtil.cxx,v $
Language: C++
- Date: $Date: 2004/06/23 03:36:24 $
- Version: $Revision: 1.45 $
+ Date: $Date: 2004/07/17 22:47:01 $
+ Version: $Revision: 1.47 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*/
std::string GetPath(std::string &fullName)
{
- int pos1=fullName.rfind("/");
- int pos2=fullName.rfind("\\");
- if(pos1>pos2)
+ int pos1 = fullName.rfind("/");
+ int pos2 = fullName.rfind("\\");
+ if( pos1 > pos2)
+ {
fullName.resize(pos1);
+ }
else
+ {
fullName.resize(pos2);
+ }
return fullName;
}
if (a == '/' || a == '\\') {
fin--;
}
- int deb;
+ int deb = 0;
for (int i=fin;i!=0;i--) {
if (fullName.c_str()[i] == '/' || fullName.c_str()[i] == '\\')
break;