From: malaterre Date: Sat, 9 Oct 2004 03:36:56 +0000 (+0000) Subject: ENH: Remove one more sprintf X-Git-Tag: Version0.6.bp~96 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=3370a8090c600a3d4dbe5573a62d1dddb59819f2;p=gdcm.git ENH: Remove one more sprintf --- diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index 9d3d59ea..495b15b3 100644 --- a/src/gdcmDocument.cxx +++ b/src/gdcmDocument.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.cxx,v $ Language: C++ - Date: $Date: 2004/10/08 08:38:54 $ - Version: $Revision: 1.98 $ + Date: $Date: 2004/10/09 03:36:56 $ + Version: $Revision: 1.99 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -33,7 +33,7 @@ #include #endif -# include +#include // Implicit VR Little Endian #define UI1_2_840_10008_1_2 "1.2.840.10008.1.2" @@ -1951,7 +1951,7 @@ void gdcmDocument::FindDocEntryVR( gdcmDocEntry *entry ) */ bool gdcmDocument::CheckDocEntryVR(gdcmDocEntry *entry, gdcmVRKey vr) { - char msg[100]; // for sprintf + std::string msg; bool realExplicit = true; // Assume we are reading a falsely explicit VR file i.e. we reached @@ -1979,9 +1979,9 @@ bool gdcmDocument::CheckDocEntryVR(gdcmDocEntry *entry, gdcmVRKey vr) { // We thought this was explicit VR, but we end up with an // implicit VR tag. Let's backtrack. - sprintf(msg,"Falsely explicit vr file (%04x,%04x)\n", - entry->GetGroup(), entry->GetElement()); - dbg.Verbose(1, "gdcmDocument::FindVR: ",msg); + msg = Format("Falsely explicit vr file (%04x,%04x)\n", + entry->GetGroup(), entry->GetElement()); + dbg.Verbose(1, "gdcmDocument::FindVR: ", msg.c_str()); if( entry->GetGroup() % 2 && entry->GetElement() == 0x0000) { diff --git a/src/gdcmDocument.h b/src/gdcmDocument.h index c499c6a0..86e86b26 100644 --- a/src/gdcmDocument.h +++ b/src/gdcmDocument.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.h,v $ Language: C++ - Date: $Date: 2004/10/06 21:30:02 $ - Version: $Revision: 1.47 $ + Date: $Date: 2004/10/09 03:36:57 $ + Version: $Revision: 1.48 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -26,14 +26,13 @@ #include "gdcmDictSet.h" #include "gdcmDocEntry.h" #include "gdcmRLEFramesInfo.h" +#include "gdcmDocEntrySet.h" +#include "gdcmElementSet.h" class gdcmValEntry; class gdcmBinEntry; class gdcmSeqEntry; -#include "gdcmDocEntrySet.h" -#include "gdcmElementSet.h" - #include #include