From 3dbc6e6cd93b554c706289ed44731194781ee297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20=C5=81oskot?= Date: Tue, 2 Feb 2021 22:30:46 +0100 Subject: [PATCH] Fix warning: returning reference to local temporary object Fixes #475 --- .../extension/toolbox/image_types/subchroma_image.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/boost/gil/extension/toolbox/image_types/subchroma_image.hpp b/include/boost/gil/extension/toolbox/image_types/subchroma_image.hpp index f49d69e286..cd7de24b29 100644 --- a/include/boost/gil/extension/toolbox/image_types/subchroma_image.hpp +++ b/include/boost/gil/extension/toolbox/image_types/subchroma_image.hpp @@ -245,8 +245,8 @@ class subchroma_image_view : public image_view : image_view< locator >( v ) {} - const point_t& v_ssfactors() const { return point_t( get_deref_fn().vx_ssfactor(), get_deref_fn().vx_ssfactor() ); } - const point_t& u_ssfactors() const { return point_t( get_deref_fn().ux_ssfactor(), get_deref_fn().ux_ssfactor() ); } + point_t v_ssfactors() const { return point_t( get_deref_fn().vx_ssfactor(), get_deref_fn().vx_ssfactor() ); } + point_t u_ssfactors() const { return point_t( get_deref_fn().ux_ssfactor(), get_deref_fn().ux_ssfactor() ); } const point_t& y_dimension() const { return _y_dimensions; } const point_t& v_dimension() const { return _v_dimensions; } @@ -256,9 +256,9 @@ class subchroma_image_view : public image_view const plane_locator_t& v_plane() const { return get_deref_fn().v_locator(); } const plane_locator_t& u_plane() const { return get_deref_fn().u_locator(); } - const plane_view_t y_plane_view() const { return plane_view_t( _y_dimensions, y_plane() ); } - const plane_view_t v_plane_view() const { return plane_view_t( _v_dimensions, v_plane() ); } - const plane_view_t u_plane_view() const { return plane_view_t( _u_dimensions, u_plane() ); } + plane_view_t y_plane_view() const { return plane_view_t( _y_dimensions, y_plane() ); } + plane_view_t v_plane_view() const { return plane_view_t( _v_dimensions, v_plane() ); } + plane_view_t u_plane_view() const { return plane_view_t( _u_dimensions, u_plane() ); } private: