From 230158bd66a2dfb1dc4ccacffd41fcd81addd59c Mon Sep 17 00:00:00 2001 From: Mateusz Loskot Date: Fri, 14 Dec 2018 08:12:45 +0100 Subject: [PATCH] Fix const on return type not applied to pointee type of typedef (#190) Replace png_structp and png_infop aliases with regular pointers to to prevent type qualifiers ignored on function return type. --- include/boost/gil/extension/io/png/detail/base.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/boost/gil/extension/io/png/detail/base.hpp b/include/boost/gil/extension/io/png/detail/base.hpp index 52bce0927..55d0abdc6 100644 --- a/include/boost/gil/extension/io/png/detail/base.hpp +++ b/include/boost/gil/extension/io/png/detail/base.hpp @@ -46,13 +46,13 @@ protected: {} png_ptr_wrapper* get() { return _png_ptr.get(); } - const png_ptr_wrapper* get() const { return _png_ptr.get(); } + png_ptr_wrapper const* get() const { return _png_ptr.get(); } - png_structp get_struct() { return get()->_struct; } - const png_structp get_struct() const { return get()->_struct; } + png_struct* get_struct() { return get()->_struct; } + png_struct const* get_struct() const { return get()->_struct; } - png_infop get_info() { return get()->_info; } - const png_infop get_info() const { return get()->_info; } + png_info* get_info() { return get()->_info; } + png_info const* get_info() const { return get()->_info; } private: