d/patches: Fix compilation of dicomscope. Closes: #1000220
authorMathieu Malaterre <malat@debian.org>
Tue, 23 Nov 2021 07:14:00 +0000 (08:14 +0100)
committerMathieu Malaterre <malat@debian.org>
Tue, 23 Nov 2021 07:14:00 +0000 (08:14 +0100)
debian/patches/bug1000220.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/bug1000220.patch b/debian/patches/bug1000220.patch
new file mode 100644 (file)
index 0000000..68c27ac
--- /dev/null
@@ -0,0 +1,44 @@
+From 8f6c9ba05eb146310a6325fb8ab18dfb14c1a291 Mon Sep 17 00:00:00 2001
+From: Joerg Riesmeier <dicom@jriesmeier.com>
+Date: Mon, 22 Nov 2021 18:54:35 +0100
+Subject: [PATCH] Replaced OFListIterator by OFListConstIterator.
+
+Replaced type of iterator variable to OFListConstIterator to avoid
+compiler errors reported by gcc when compiling DICOMscope with STL
+and C++14 support enabled.
+
+Thanks to GitHub user "malaterre" for the report and suggested fix.
+---
+ dcmsr/include/dcmtk/dcmsr/dsrtlist.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/dcmsr/include/dcmtk/dcmsr/dsrtlist.h b/dcmsr/include/dcmtk/dcmsr/dsrtlist.h
+index 5ec109aca..31759b851 100644
+--- a/dcmsr/include/dcmtk/dcmsr/dsrtlist.h
++++ b/dcmsr/include/dcmtk/dcmsr/dsrtlist.h
+@@ -1,6 +1,6 @@
+ /*
+  *
+- *  Copyright (C) 2000-2018, OFFIS e.V.
++ *  Copyright (C) 2000-2021, OFFIS e.V.
+  *  All rights reserved.  See COPYRIGHT file for details.
+  *
+  *  This software and supporting documentation were developed by
+@@ -282,7 +282,7 @@ template<class T> class DSRListOfItems
+             ItemList.push_back(item);
+             result = EC_Normal;
+         } else {
+-            OFLIST_TYPENAME OFListIterator(T) iterator = ItemList.begin();
++            OFLIST_TYPENAME OFListConstIterator(T) iterator = ItemList.begin();
+             if (gotoItemPos(idx, iterator))
+             {
+                 ItemList.insert(iterator, 1, item);
+@@ -299,7 +299,7 @@ template<class T> class DSRListOfItems
+     OFCondition removeItem(const size_t idx)
+     {
+         OFCondition result = EC_IllegalParameter;
+-        OFLIST_TYPENAME OFListIterator(T) iterator = ItemList.begin();
++        OFLIST_TYPENAME OFListConstIterator(T) iterator = ItemList.begin();
+         if (gotoItemPos(idx, iterator))
+         {
+             ItemList.erase(iterator);
index 01b30684b600339ea5b9c14201e0e0fea54b7ef9..2b398ace0e74e4db0412cbc714bd1542f5236916 100644 (file)
@@ -2,3 +2,4 @@
 03_datadic_install.patch
 07_dont_export_all_executables.patch
 bigendian.patch
+bug1000220.patch