]> Creatis software - gdcm.git/commitdiff
ENH: Fix TestVR on VS6, while preserving inline optimization on working compiler
authormalaterre <malaterre>
Thu, 20 Oct 2005 14:45:11 +0000 (14:45 +0000)
committermalaterre <malaterre>
Thu, 20 Oct 2005 14:45:11 +0000 (14:45 +0000)
src/gdcmVR.cxx
src/gdcmVR.h

index 75dca7bb91f2bcaf56072a096c7433fc764a31bb..e091908658d13942c245198209e3c1fc331561d1 100644 (file)
@@ -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
 
index c7c466d49dd068b9c3a6b82d153d1be92bd102e6..8728d51b58a0068aee944087edb5823b13dde942 100644 (file)
@@ -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);