From 3c0cc72c558bef475816cff27c8d7a32a9f65c78 Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Wed, 19 Oct 2016 10:06:29 +0200 Subject: [PATCH] fix(config): Test type and not value --- include/components/config.hpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/components/config.hpp b/include/components/config.hpp index c9b30439..5c16d66c 100644 --- a/include/components/config.hpp +++ b/include/components/config.hpp @@ -212,12 +212,13 @@ class config { } if (path.find("xrdb:") == 0) { - if (std::is_same()) + if (std::is_same::value) return boost::lexical_cast(m_xrm.get_string(path.substr(5))); - else if (std::is_same()) + else if (std::is_same::value) return boost::lexical_cast(m_xrm.get_float(path.substr(5))); - else if (std::is_same()) + else if (std::is_same::value) return boost::lexical_cast(m_xrm.get_int(path.substr(5))); + return ref_val; } auto ref_path = build_path(ref_section, ref_key);