]> Creatis software - gdcm.git/commitdiff
COMP: Solve both problem of push_back missing in VS6 (already fixed) and no need...
authormalaterre <malaterre>
Fri, 28 Jan 2005 17:29:59 +0000 (17:29 +0000)
committermalaterre <malaterre>
Fri, 28 Jan 2005 17:29:59 +0000 (17:29 +0000)
src/gdcmUtil.cxx

index 8433ad06ce08115ff2ec04b62d288bcb6c384da7..8fa6d9b14a896741213ae16efff9e18f7f01660e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmUtil.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/28 09:37:29 $
-  Version:   $Revision: 1.126 $
+  Date:      $Date: 2005/01/28 17:29:59 $
+  Version:   $Revision: 1.127 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -19,7 +19,6 @@
 #include "gdcmUtil.h"
 #include "gdcmDebug.h"
 #include <iostream>
-#include <algorithm>
 
 // For GetCurrentDate, GetCurrentTime
 #include <time.h>
@@ -711,11 +710,9 @@ std::string Util::GetMACAddress()
       while(!zero)
       {
          res = getlastdigit(addr);
-         sres += ('0' + res);
+         sres.insert(sres.begin(), '0' + res);
          zero = (addr[0] == 0) && (addr[1] == 0) && (addr[2] == 0) && (addr[3] == 0) && (addr[4] == 0) && (addr[5] == 0);
       }
-      // Since we push back the proper number is reversed:
-      std::reverse(sres.begin(),sres.end());
 
       return sres;
    }