From: malaterre Date: Thu, 20 Oct 2005 14:45:11 +0000 (+0000) Subject: ENH: Fix TestVR on VS6, while preserving inline optimization on working compiler X-Git-Tag: OpenJPEG.Version1.2~289 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=07046950e3803d2a5b33185309d3f678dab0e9a7;p=gdcm.git ENH: Fix TestVR on VS6, while preserving inline optimization on working compiler --- diff --git a/src/gdcmVR.cxx b/src/gdcmVR.cxx index 75dca7bb..e0919086 100644 --- a/src/gdcmVR.cxx +++ b/src/gdcmVR.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmVR.cxx,v $ Language: C++ - Date: $Date: 2005/10/20 14:25:47 $ - Version: $Revision: 1.43 $ + Date: $Date: 2005/10/20 14:45:11 $ + Version: $Revision: 1.44 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -164,6 +164,14 @@ unsigned short VR::GetAtomicElementLength(VRKey const &tested) return 1; } +// VS6 need a single implementation in the dll +#if defined(_MSC_VER) && (_MSC_VER == 1200) +bool VR::IsValidVR(VRKey const &key) +{ + return vr.find(key) != vr.end(); +} +#endif + //----------------------------------------------------------------------------- // Protected diff --git a/src/gdcmVR.h b/src/gdcmVR.h index c7c466d4..8728d51b 100644 --- a/src/gdcmVR.h +++ b/src/gdcmVR.h @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmVR.h,v $ Language: C++ - Date: $Date: 2005/10/20 08:58:18 $ - Version: $Revision: 1.22 $ + Date: $Date: 2005/10/20 14:45:11 $ + Version: $Revision: 1.23 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -57,7 +57,12 @@ public: /// corresponds to the Value Representation of a \ref SeqEntry bool IsVROfSequence(VRKey const &tested) { return tested == "SQ"; } +// Remove inline optimization for VS6 +#if defined(_MSC_VER) && (_MSC_VER == 1200) + bool IsValidVR(VRKey const &key); +#else bool IsValidVR(VRKey const &key) { return vr.find(key) != vr.end(); } +#endif unsigned short GetAtomicElementLength(VRKey const &tested);