]> Creatis software - gdcm.git/commitdiff
COMP: Fix a bunch of warnings. Try to get template to compile on the pseudo VS6 so...
authormalaterre <malaterre>
Mon, 8 Oct 2007 15:20:17 +0000 (15:20 +0000)
committermalaterre <malaterre>
Mon, 8 Oct 2007 15:20:17 +0000 (15:20 +0000)
src/gdcmDicomDirMeta.cxx
src/gdcmDicomDirPatient.cxx
src/gdcmDicomDirSerie.cxx
src/gdcmDicomDirStudy.cxx
src/gdcmDocument.cxx
src/gdcmDocument.h
src/gdcmFile.cxx
src/gdcmFileHelper.cxx
src/gdcmSQItem.cxx
src/gdcmSegmentedPalette.h
src/gdcmSeqEntry.cxx

index 0c98a59d551d94e1f110663e6b69c6d27985749c..354fd1ed85600c6fc4dbccd30c5306680b5afd87 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirMeta.cxx,v $
   Language:  C++
-  Date:      $Date: 2007/08/29 15:30:48 $
-  Version:   $Revision: 1.39 $
+  Date:      $Date: 2007/10/08 15:20:17 $
+  Version:   $Revision: 1.40 $
                                                                                 
   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,7 @@ DicomDirMeta::~DicomDirMeta()
  * @return
  */ 
 void DicomDirMeta::WriteContent(std::ofstream *fp, FileType filetype,
-                                 bool dummy, bool dummy2)
+                                 bool , bool )
 {
    // 'File Meta Information Version'
    
index 33896dff5a6a3cb20bc4be534b7ab734d9356f0b..c8cc875f876354c73702860af433fe5f2bcad480 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirPatient.cxx,v $
   Language:  C++
-  Date:      $Date: 2007/08/29 15:30:48 $
-  Version:   $Revision: 1.43 $
+  Date:      $Date: 2007/10/08 15:20:17 $
+  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
@@ -57,7 +57,7 @@ DicomDirPatient::~DicomDirPatient()
  * @param fp ofstream to write to
  * @param t Type of the File (explicit VR, implicitVR, ...) 
  */ 
-void DicomDirPatient::WriteContent(std::ofstream *fp, FileType t, bool dummy, bool dummy2)
+void DicomDirPatient::WriteContent(std::ofstream *fp, FileType t, bool , bool )
 {
    DicomDirObject::WriteContent(fp, t, false, true);
 
index 99a96c2d61c0709d8ce4a70fad784b62cdadf3b8..6b0d8f9ae33ebe6bef67dff866fe91e03593da12 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirSerie.cxx,v $
   Language:  C++
-  Date:      $Date: 2007/08/29 15:30:49 $
-  Version:   $Revision: 1.45 $
+  Date:      $Date: 2007/10/08 15:20:17 $
+  Version:   $Revision: 1.46 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -58,7 +58,7 @@ DicomDirSerie::~DicomDirSerie()
  * @param fp ofstream to write to
  * @param t Type of the File (explicit VR, implicitVR, ...)
  */ 
-void DicomDirSerie::WriteContent(std::ofstream *fp, FileType t, bool dummy, bool dummy2)
+void DicomDirSerie::WriteContent(std::ofstream *fp, FileType t, bool , bool )
 {
    DicomDirObject::WriteContent(fp, t, false, true);
 
index 5c28eec9cc4cef55fd5e98bc2d6cf00c71bd3bf3..5e34175cd02c3c1a27c297c3ff31b399dc44b62b 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDicomDirStudy.cxx,v $
   Language:  C++
-  Date:      $Date: 2007/08/29 15:30:49 $
-  Version:   $Revision: 1.45 $
+  Date:      $Date: 2007/10/08 15:20:17 $
+  Version:   $Revision: 1.46 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -58,7 +58,7 @@ DicomDirStudy::~DicomDirStudy()
  * @param t Type of the File (explicit VR, implicitVR, ...) 
  * @return
  */ 
-void DicomDirStudy::WriteContent(std::ofstream *fp, FileType t, bool dummy, bool dummy2)
+void DicomDirStudy::WriteContent(std::ofstream *fp, FileType t, bool , bool )
 {
    DicomDirObject::WriteContent(fp, t, false, true);
 
index 518620d987919b67f283ba4725b85501652464a5..4577c5a0511f70bfa7302d01e6f2eee52a1ce8f8 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.cxx,v $
   Language:  C++
-  Date:      $Date: 2007/09/25 15:21:57 $
-  Version:   $Revision: 1.372 $
+  Date:      $Date: 2007/10/08 15:20:17 $
+  Version:   $Revision: 1.373 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -693,7 +693,7 @@ bool Document::CloseFile()
  * @param filetype Type of the File to be written 
  *          (ACR-NEMA, ExplicitVR, ImplicitVR)
  */
-void Document::WriteContent(std::ofstream *fp, FileType filetype)
+void Document::WriteContent(std::ofstream *fp, FileType filetype, bool, bool)
 {
    // Skip if user wants to write an ACR-NEMA file
 
index 874769a122b11f9465fa85df633459f085406d46..31a030cee597607cd01b573da91645edfece10f5 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.h,v $
   Language:  C++
-  Date:      $Date: 2007/09/17 12:16:02 $
-  Version:   $Revision: 1.147 $
+  Date:      $Date: 2007/10/08 15:20:17 $
+  Version:   $Revision: 1.148 $
  
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -83,7 +83,7 @@ public:
 
    std::ifstream *OpenFile();
    bool CloseFile();
-   void WriteContent( std::ofstream *fp, FileType type );
+   void WriteContent( std::ofstream *fp, FileType type, bool insideMetaElements, bool insideSequence );
 
 // Data entries
    virtual void LoadEntryBinArea(uint16_t group, uint16_t elem);
index ae2ae3caeb5186e8581dcfb9cb55065d082d8cba..48732a3086f83b2510101e92ba0648161b90a17e 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmFile.cxx,v $
   Language:  C++
-  Date:      $Date: 2007/10/03 09:32:10 $
-  Version:   $Revision: 1.339 $
+  Date:      $Date: 2007/10/08 15:20:17 $
+  Version:   $Revision: 1.340 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -2012,7 +2012,7 @@ bool File::Write(std::string fileName, FileType writetype)
          InsertEntryString(s_lgPix,GrPixel, 0x0000, "UL");
       }
    }
-   Document::WriteContent(fp, writetype);
+   Document::WriteContent(fp, writetype,false,false);
 
    fp->close();
    delete fp;
index 800d1efd4671eda0331dc8fa3a4044f71ad94768..f05197d19a62d09a28f21419b044b170ffa4d17a 100644 (file)
@@ -4,8 +4,8 @@
   Module:    $RCSfile: gdcmFileHelper.cxx,v $
   Language:  C++
 
-  Date:      $Date: 2007/10/01 09:28:57 $
-  Version:   $Revision: 1.131 $
+  Date:      $Date: 2007/10/08 15:20:17 $
+  Version:   $Revision: 1.132 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -727,7 +727,6 @@ bool FileHelper::Write(std::string const &fileName)
 { 
    CheckMandatoryElements(); //called once, here !
    
-   bool flag = false;
    switch(WriteType)
    {
       case ImplicitVR:
index 8a796aac73329ef459037449b138285a16aee393..b6c5dd0d31c9a9045d7abbc1ea2b0a5fbe2ff82d 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSQItem.cxx,v $
   Language:  C++
-  Date:      $Date: 2007/08/29 15:30:49 $
-  Version:   $Revision: 1.87 $
+  Date:      $Date: 2007/10/08 15:20:17 $
+  Version:   $Revision: 1.88 $
   
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -55,7 +55,7 @@ SQItem::~SQItem()
  * @param filetype type of the file (ACR, ImplicitVR, ExplicitVR, ...)
  */
 void SQItem::WriteContent(std::ofstream *fp, FileType filetype, 
-                               bool insideMetaElements, bool dummy2)
+                               bool , bool )
 {
    int j;
    uint16_t item[4] = { 0xfffe, 0xe000, 0xffff, 0xffff };
index 8949d734be1afb6b40da5f2d975dc8c49eeb19ae..2f2c57c99d9045c92f2eb58e03898207ba52c38c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSegmentedPalette.h,v $
   Language:  C++
-  Date:      $Date: 2007/10/03 13:18:28 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2007/10/08 15:20:17 $
+  Version:   $Revision: 1.9 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 #include <vector>
 #include <iterator>
 
+// Hack for VS6
+#if defined(_MSC_VER) && (_MSC_VER < 1310)
+#define GDCM_TYPENAME class
+#else
+#define GDCM_TYPENAME typename
+#endif
+
 namespace GDCM_NAME_SPACE
 {
     // abstract class for segment.
-    template <typename EntryType>
+    template <GDCM_TYPENAME EntryType>
     class Segment {
     public:
         typedef std::map<const EntryType*, const Segment*> SegmentMap;
@@ -69,7 +76,7 @@ namespace GDCM_NAME_SPACE
     };
 
     // discrete segment (opcode = 0)
-    template <typename EntryType>
+    template <GDCM_TYPENAME EntryType>
     class DiscreteSegment : public Segment<EntryType> {
     public:
         typedef typename Segment<EntryType>::SegmentMap SegmentMap;
@@ -84,7 +91,7 @@ namespace GDCM_NAME_SPACE
     };
 
     // linear segment (opcode = 1)
-    template <typename EntryType>
+    template <GDCM_TYPENAME EntryType>
     class LinearSegment : public Segment<EntryType> {
     public:
         typedef typename Segment<EntryType>::SegmentMap SegmentMap;
@@ -113,7 +120,7 @@ namespace GDCM_NAME_SPACE
     };
 
     // indirect segment (opcode = 2)
-    template <typename EntryType>
+    template <GDCM_TYPENAME EntryType>
     class IndirectSegment : public Segment<EntryType> {
     public:
         typedef typename Segment<EntryType>::SegmentMap SegmentMap;
@@ -149,7 +156,7 @@ namespace GDCM_NAME_SPACE
         }
     };
 
-    template <typename EntryType>
+    template <GDCM_TYPENAME EntryType>
     void ExpandPalette(const EntryType* raw_values, uint32_t length,
         std::vector<EntryType>& palette)
     {
@@ -243,4 +250,7 @@ namespace GDCM_NAME_SPACE
 } // end namespace gdcm
 
 
+// do not pollute namespace:
+#undef GDCM_TYPENAME
+
 #endif
index afb8f04a515072ca148d6fad9b493338f14ac566..7b047295c3205a8fdd7190561e10987e32d0ba23 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmSeqEntry.cxx,v $
   Language:  C++
-  Date:      $Date: 2007/09/14 08:22:19 $
-  Version:   $Revision: 1.71 $
+  Date:      $Date: 2007/10/08 15:20:17 $
+  Version:   $Revision: 1.72 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -80,7 +80,7 @@ SeqEntry::~SeqEntry()
  * @param fp pointer to an already open file
  * @param filetype type of the file (ACR, ImplicitVR, ExplicitVR, ...)
  */
-void SeqEntry::WriteContent(std::ofstream *fp, FileType filetype, bool dummy, bool dummy2)
+void SeqEntry::WriteContent(std::ofstream *fp, FileType filetype, bool , bool )
 {
    uint16_t seq_term_gr = 0xfffe;
    uint16_t seq_term_el = 0xe0dd;