From: malaterre Date: Sat, 9 Oct 2004 03:48:25 +0000 (+0000) Subject: ENH: Remove three more sprintf, the last ones X-Git-Tag: Version0.6.bp~94 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=9abd0fc4867e2cf4df38785d632de6ffc32cefe5;p=gdcm.git ENH: Remove three more sprintf, the last ones --- diff --git a/src/gdcmValEntry.cxx b/src/gdcmValEntry.cxx index 66fc32a7..c5028a8c 100644 --- a/src/gdcmValEntry.cxx +++ b/src/gdcmValEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmValEntry.cxx,v $ Language: C++ - Date: $Date: 2004/09/27 08:39:08 $ - Version: $Revision: 1.27 $ + Date: $Date: 2004/10/09 03:48:25 $ + Version: $Revision: 1.28 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -67,7 +67,7 @@ void gdcmValEntry::Print(std::ostream & os) uint16_t e = GetElement(); std::string vr = GetVR(); std::ostringstream s; - char st[20]; + std::string st; TSKey v; std::string d2; @@ -150,17 +150,17 @@ void gdcmValEntry::Print(std::ostream & os) { if (v == "4294967295") // to avoid troubles in convertion { - sprintf (st," x(ffffffff)"); + st = Format(" x(ffffffff)"); } else { if ( GetLength() !=0 ) { - sprintf(st," x(%x)", atoi(v.c_str()));//FIXME + st = Format(" x(%x)", atoi(v.c_str()));//FIXME } else { - sprintf(st," "); + st = Format(" "); } } s << st;