From: malaterre Date: Tue, 14 Jun 2005 20:53:19 +0000 (+0000) Subject: ENH: Sltightly better code X-Git-Tag: Version1.2.bp~496 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=3728b2f5c936e81d7ab96d576338fa7e8eb71e48;p=gdcm.git ENH: Sltightly better code --- diff --git a/src/gdcmValidator.cxx b/src/gdcmValidator.cxx index 3b9ac39b..8d0e2ac0 100644 --- a/src/gdcmValidator.cxx +++ b/src/gdcmValidator.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmValidator.cxx,v $ Language: C++ - Date: $Date: 2005/06/14 20:33:54 $ - Version: $Revision: 1.1 $ + Date: $Date: 2005/06/14 20:53:19 $ + Version: $Revision: 1.2 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,6 +21,8 @@ #include "gdcmBinEntry.h" #include "gdcmValEntry.h" +#include + namespace gdcm { @@ -42,9 +44,12 @@ bool CheckVM(ValEntry *v) { n = 0; } - n++; //poteaux / intervalles + n++; // number of '\' + 1 == Value Multiplicity - unsigned int m = atoi(v->GetVM().c_str()); + unsigned int m; + std::istringstream os; + os.str( v->GetVM()); + os >> m; return n == m; }