Fix build failure with GCC 7

This commit is contained in:
Jonathan Wakely 2017-02-17 00:59:34 +00:00
parent 6f3f1637ab
commit 6d67e09d1b
2 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,25 @@
From 18675a51fca27b324eb4e4b49593bcee9bc4535e Mon Sep 17 00:00:00 2001
From: Jonathan Wakely <jwakely@redhat.com>
Date: Fri, 17 Feb 2017 00:55:25 +0000
Subject: [PATCH] Fix parameter of ImagePyramid::swap
You can't swap with a const object. This fixes a compilation failure
with GCC 7 which rejects the incorrect function even if it isn't
instantiated.
---
include/vigra/imagecontainer.hxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/vigra/imagecontainer.hxx b/include/vigra/imagecontainer.hxx
index a6f0f80..636cc64 100644
--- a/include/vigra/imagecontainer.hxx
+++ b/include/vigra/imagecontainer.hxx
@@ -763,7 +763,7 @@ public:
/** swap contents of this array with the contents of other
(STL-Container interface)
*/
- void swap(const ImagePyramid<ImageType, Alloc> &other)
+ void swap(ImagePyramid<ImageType, Alloc> &other)
{
images_.swap(other.images_);
std::swap(lowestLevel_, other.lowestLevel_);

View File

@ -22,6 +22,8 @@ BuildRequires: hdf5-devel python-sphinx numpy-f2py boost-python OpenEXR-devel
Patch0: vigra.rhbz987048.shebang.patch
# https://github.com/ukoethe/vigra/pull/212
Patch2: vigra-1.10.0-no-lenna.patch
# https://github.com/ukoethe/vigra/pull/405
Patch3: vigra-1.11.0-const-swap.patch
%description
VIGRA stands for "Vision with Generic Algorithms". It's a novel computer vision
@ -59,6 +61,7 @@ The vigra-python package provides python bindings for vigra
#patch0 -p1 -b .rhbz987048.shebang.patch
%patch0 -p1
%patch2 -p1 -b .no-lenna
%patch3 -p1 -b .const-swap
%build
%if ! 0%{?rhel}
@ -109,6 +112,9 @@ rm -rf %{buildroot}
%endif
%changelog
* Fri Feb 17 2017 Jonathan Wakely <jwakely@redhat.com> - 1.11.0-5
- Fix build failure with GCC 7
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild