From: malaterre Date: Mon, 8 Oct 2007 15:20:17 +0000 (+0000) Subject: COMP: Fix a bunch of warnings. Try to get template to compile on the pseudo VS6 so... X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=add6c88b334e9cf4ddb0ae1849f1380f9844f99c;p=gdcm.git COMP: Fix a bunch of warnings. Try to get template to compile on the pseudo VS6 so called c++ compiler --- diff --git a/src/gdcmDicomDirMeta.cxx b/src/gdcmDicomDirMeta.cxx index 0c98a59d..354fd1ed 100644 --- a/src/gdcmDicomDirMeta.cxx +++ b/src/gdcmDicomDirMeta.cxx @@ -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' diff --git a/src/gdcmDicomDirPatient.cxx b/src/gdcmDicomDirPatient.cxx index 33896dff..c8cc875f 100644 --- a/src/gdcmDicomDirPatient.cxx +++ b/src/gdcmDicomDirPatient.cxx @@ -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); diff --git a/src/gdcmDicomDirSerie.cxx b/src/gdcmDicomDirSerie.cxx index 99a96c2d..6b0d8f9a 100644 --- a/src/gdcmDicomDirSerie.cxx +++ b/src/gdcmDicomDirSerie.cxx @@ -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); diff --git a/src/gdcmDicomDirStudy.cxx b/src/gdcmDicomDirStudy.cxx index 5c28eec9..5e34175c 100644 --- a/src/gdcmDicomDirStudy.cxx +++ b/src/gdcmDicomDirStudy.cxx @@ -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); diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index 518620d9..4577c5a0 100644 --- a/src/gdcmDocument.cxx +++ b/src/gdcmDocument.cxx @@ -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 diff --git a/src/gdcmDocument.h b/src/gdcmDocument.h index 874769a1..31a030ce 100644 --- a/src/gdcmDocument.h +++ b/src/gdcmDocument.h @@ -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); diff --git a/src/gdcmFile.cxx b/src/gdcmFile.cxx index ae2ae3ca..48732a30 100644 --- a/src/gdcmFile.cxx +++ b/src/gdcmFile.cxx @@ -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; diff --git a/src/gdcmFileHelper.cxx b/src/gdcmFileHelper.cxx index 800d1efd..f05197d1 100644 --- a/src/gdcmFileHelper.cxx +++ b/src/gdcmFileHelper.cxx @@ -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: diff --git a/src/gdcmSQItem.cxx b/src/gdcmSQItem.cxx index 8a796aac..b6c5dd0d 100644 --- a/src/gdcmSQItem.cxx +++ b/src/gdcmSQItem.cxx @@ -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 }; diff --git a/src/gdcmSegmentedPalette.h b/src/gdcmSegmentedPalette.h index 8949d734..2f2c57c9 100644 --- a/src/gdcmSegmentedPalette.h +++ b/src/gdcmSegmentedPalette.h @@ -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 @@ -41,10 +41,17 @@ #include #include +// 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 + template class Segment { public: typedef std::map SegmentMap; @@ -69,7 +76,7 @@ namespace GDCM_NAME_SPACE }; // discrete segment (opcode = 0) - template + template class DiscreteSegment : public Segment { public: typedef typename Segment::SegmentMap SegmentMap; @@ -84,7 +91,7 @@ namespace GDCM_NAME_SPACE }; // linear segment (opcode = 1) - template + template class LinearSegment : public Segment { public: typedef typename Segment::SegmentMap SegmentMap; @@ -113,7 +120,7 @@ namespace GDCM_NAME_SPACE }; // indirect segment (opcode = 2) - template + template class IndirectSegment : public Segment { public: typedef typename Segment::SegmentMap SegmentMap; @@ -149,7 +156,7 @@ namespace GDCM_NAME_SPACE } }; - template + template void ExpandPalette(const EntryType* raw_values, uint32_t length, std::vector& palette) { @@ -243,4 +250,7 @@ namespace GDCM_NAME_SPACE } // end namespace gdcm +// do not pollute namespace: +#undef GDCM_TYPENAME + #endif diff --git a/src/gdcmSeqEntry.cxx b/src/gdcmSeqEntry.cxx index afb8f04a..7b047295 100644 --- a/src/gdcmSeqEntry.cxx +++ b/src/gdcmSeqEntry.cxx @@ -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;