From 3879bc6a4e2e322fb7ba8ab61db3c54ede6bb6a7 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Thu, 10 Mar 2016 21:09:41 +0200 Subject: [core] Make vec{2,3,4} operator bool explicit --- include/mbgl/util/vec.hpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/mbgl/util/vec.hpp b/include/mbgl/util/vec.hpp index a8bbd14b0f..7c91ee0ad7 100644 --- a/include/mbgl/util/vec.hpp +++ b/include/mbgl/util/vec.hpp @@ -85,12 +85,12 @@ struct vec2 { } template::has_quiet_NaN, int>::type = 0> - inline operator bool() const { + explicit operator bool() const { return !std::isnan(x) && !std::isnan(y); } template::has_quiet_NaN, int>::type = 0> - inline operator bool() const { + explicit operator bool() const { return x != std::numeric_limits::min() && y != std::numeric_limits::min(); } }; @@ -107,12 +107,12 @@ struct vec3 { } template::has_quiet_NaN, int>::type = 0> - inline operator bool() const { + explicit operator bool() const { return !std::isnan(x) && !std::isnan(y) && !std::isnan(z); } template::has_quiet_NaN, int>::type = 0> - inline operator bool() const { + explicit operator bool() const { return x != std::numeric_limits::min() && y != std::numeric_limits::min() && z != std::numeric_limits::min(); @@ -131,12 +131,12 @@ struct vec4 { } template::has_quiet_NaN, int>::type = 0> - inline operator bool() const { + explicit operator bool() const { return !std::isnan(x) && !std::isnan(y) && !std::isnan(z) && !std::isnan(w); } template::has_quiet_NaN, int>::type = 0> - inline operator bool() const { + explicit operator bool() const { return x != std::numeric_limits::min() && y != std::numeric_limits::min() && z != std::numeric_limits::min() -- cgit v1.2.1