]> Creatis software - gdcm.git/commitdiff
BUG: Rahhhh std::right and std::ios::right are two completely different thing. Since...
authormalaterre <malaterre>
Mon, 11 Jul 2005 19:46:05 +0000 (19:46 +0000)
committermalaterre <malaterre>
Mon, 11 Jul 2005 19:46:05 +0000 (19:46 +0000)
src/gdcmCommon.h

index c5788454adbae655bcc90d5515df7f37260b0111..f4889a5d29fb07171b2fc87ca237688d312b3494 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmCommon.h,v $
   Language:  C++
-  Date:      $Date: 2005/07/11 18:29:58 $
-  Version:   $Revision: 1.77 $
+  Date:      $Date: 2005/07/11 19:46:05 $
+  Version:   $Revision: 1.78 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -134,11 +134,10 @@ typedef union   {
 /* ostream operator for TagKey */
 inline std::ostream& operator<<(std::ostream& _O, TagKey _val)
 {
-  return ( _O << std::ios::right << std::setw(4) << std::setfill('0') << std::hex
-      << _val.tab[0] << "|" << std::ios::right << std::setw(4) << 
-      std::setfill('0') << std::hex << _val.tab[1] 
-      // put back defaults:
-      << std::setfill(' ') << std::ios::left << std::dec);
+  _O.setf( std::ios::right);
+  return (_O << std::hex << std::setw( 4 ) << std::setfill( '0' )
+     << _val.tab[0] << '|' << std::setw( 4 ) << std::setfill( '0' )
+     << _val.tab[1] << std::setfill( ' ' ) << std::dec);
 };
 inline bool operator==(TagKey _self, TagKey _val)
 {