From e20ae671104f3b91270a4b86c6c173f440ed8494 Mon Sep 17 00:00:00 2001 From: artemp Date: Thu, 14 May 2015 10:45:34 +0100 Subject: [PATCH] apply constness --- src/image_util.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/image_util.cpp b/src/image_util.cpp index e4d44e6f5..09ed6e56f 100644 --- a/src/image_util.cpp +++ b/src/image_util.cpp @@ -639,7 +639,7 @@ struct visitor_set_alpha visitor_set_alpha(float opacity) : opacity_(clamp(opacity, 0.0f, 1.0f)) {} - void operator() (image_rgba8 & data) + void operator() (image_rgba8 & data) const { using pixel_type = image_rgba8::pixel_type; pixel_type a1 = static_cast(255.0 * opacity_); @@ -662,7 +662,7 @@ struct visitor_set_alpha } template - void operator() (T & data) + void operator() (T & data) const { throw std::runtime_error("Error: set_alpha with " + std::string(typeid(data).name()) + " is not supported"); }