From 44cd4c0319c75d4315fe0554d701effe77680776 Mon Sep 17 00:00:00 2001 From: lvw Date: Mon, 4 Oct 2004 20:47:58 +0000 Subject: Added a patch to correct minor errors. Further, remove using namespace directives in order to remain compatible with g++ 2.95.4 git-svn-id: https://vdr-muggle.svn.sourceforge.net/svnroot/vdr-muggle/trunk/muggle-plugin@200 e10066b5-e1e2-0310-b819-94efdf66514b --- mg_filters.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'mg_filters.c') diff --git a/mg_filters.c b/mg_filters.c index f8c164d..e0457da 100644 --- a/mg_filters.c +++ b/mg_filters.c @@ -3,17 +3,17 @@ * \brief ******************************************************************** * \version $Revision: 1.3 $ - * \date $Date: 2004/05/28 15:29:18 $ + * \date $Date$ * \author Ralf Klueber, Lars von Wedel, Andreas Kellner - * \author file owner: $Author: lvw $ + * \author file owner: $Author$ */ /*******************************************************************/ /* makes sure we dont parse the same declarations twice */ +#include #include "mg_filters.h" #include "mg_tools.h" -using namespace std; //------------------------------------------------------------------- // mgFilter @@ -54,12 +54,12 @@ mgFilterInt::~mgFilterInt() { } -string mgFilterInt::getStrVal() +std::string mgFilterInt::getStrVal() { char buffer[20]; sprintf(buffer, "%d", m_intval); - return (string)buffer; + return (std::string)buffer; } int mgFilterInt::getIntVal() @@ -109,7 +109,7 @@ bool mgFilterInt::isSet() // mgFilterString //------------------------------------------------------------------- mgFilterString::mgFilterString(const char *name, const char* value, - int maxlen, string allowedchar) + int maxlen, std::string allowedchar) : mgFilter(name) { m_type = STRING; @@ -132,14 +132,14 @@ int mgFilterString::getMaxLength() return m_maxlen; } -string mgFilterString::getAllowedChars() +std::string mgFilterString::getAllowedChars() { return m_allowedchar; } -string mgFilterString::getStrVal() +std::string mgFilterString::getStrVal() { - return (string) m_strval; + return (std::string) m_strval; } void mgFilterString::store() { @@ -172,7 +172,7 @@ bool mgFilterString::isSet() // mgFilterBool //------------------------------------------------------------------- mgFilterBool::mgFilterBool(const char *name, bool value, - string truestr, string falsestr) + std::string truestr, std::string falsestr) : mgFilter(name) { m_type = BOOL; @@ -188,7 +188,7 @@ mgFilterBool::~mgFilterBool() { } -string mgFilterBool::getStrVal() +std::string mgFilterBool::getStrVal() { if(m_bval) return "true"; @@ -201,12 +201,12 @@ int mgFilterBool::getIntVal() return (int) m_bval; } -string mgFilterBool::getTrueString() +std::string mgFilterBool::getTrueString() { return m_truestr; } -string mgFilterBool::getFalseString() +std::string mgFilterBool::getFalseString() { return m_falsestr; } @@ -243,7 +243,7 @@ bool mgFilterBool::isSet() //------------------------------------------------------------------- // mgFilterChoice //------------------------------------------------------------------- -mgFilterChoice::mgFilterChoice(const char *name, int value, vector *choices) +mgFilterChoice::mgFilterChoice(const char *name, int value, std::vector *choices) : mgFilter(name) { m_type = CHOICE; @@ -260,7 +260,7 @@ mgFilterChoice::~mgFilterChoice() m_choices.clear(); } -string mgFilterChoice::getStrVal() +std::string mgFilterChoice::getStrVal() { if( m_selval < 0 || m_selval >= (int) m_choices.size() ) { @@ -268,7 +268,7 @@ string mgFilterChoice::getStrVal() } return m_choices[m_selval]; } -vector &mgFilterChoice::getChoices() +std::vector &mgFilterChoice::getChoices() { return m_choices; } -- cgit v1.2.3