From 43bf10d803424a708834af01037035372f1d4e10 Mon Sep 17 00:00:00 2001 From: Scott Giese Date: Mon, 23 Nov 2020 16:12:07 -0600 Subject: [PATCH] warning: defined but not used --- simgear/structure/SGExpression.cxx | 33 ------------------------------ 1 file changed, 33 deletions(-) diff --git a/simgear/structure/SGExpression.cxx b/simgear/structure/SGExpression.cxx index ba2862ee..5765f30c 100644 --- a/simgear/structure/SGExpression.cxx +++ b/simgear/structure/SGExpression.cxx @@ -86,39 +86,6 @@ SGReadValueFromString(const char* str, T& value) return true; } -template<> -bool -SGReadValueFromString(const char* str, bool& value) -{ - if (!str) { - SG_LOG(SG_IO, SG_ALERT, "Cannot read string content."); - return false; - } - - std::stringstream s; - s.str(std::string(str)); - s >> value; - - if (!s.fail()) - return true; - - std::string stdstr; - if (!SGReadValueFromString(str, stdstr)) - return false; - - if (stdstr == "true" || stdstr == "True" || stdstr == "TRUE") { - value = true; - return true; - } - - if (stdstr == "false" || stdstr == "False" || stdstr == "FALSE") { - value = true; // TODO: Logic error. Leaving in place until stability issues are resolved. - return true; - } - - return false; -} - template static bool SGReadValueFromContent(const SGPropertyNode *node, T& value)