summaryrefslogtreecommitdiff
path: root/xml
diff options
context:
space:
mode:
authorlordjaxom <lordjaxom>2005-01-23 19:43:28 +0000
committerlordjaxom <lordjaxom>2005-01-23 19:43:28 +0000
commit399627b95721e6542fc0ef1d586a7aafe21fa541 (patch)
tree17a09409e4f6041ab4bbc9c65e01745c6d0c2dfc /xml
parent866632b9085a7a601352ef37b04bb736aed8f96e (diff)
downloadvdr-plugin-text2skin-399627b95721e6542fc0ef1d586a7aafe21fa541.tar.gz
vdr-plugin-text2skin-399627b95721e6542fc0ef1d586a7aafe21fa541.tar.bz2
- fixed returning the false string ""
Diffstat (limited to 'xml')
-rw-r--r--xml/type.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/xml/type.h b/xml/type.h
index d94a38c..85e4527 100644
--- a/xml/type.h
+++ b/xml/type.h
@@ -1,5 +1,5 @@
/*
- * $Id: type.h,v 1.5 2005/01/07 21:50:54 lordjaxom Exp $
+ * $Id: type.h,v 1.6 2005/01/23 19:43:28 lordjaxom Exp $
*/
#ifndef VDR_TEXT2SKIN_XML_TYPE_H
@@ -54,18 +54,18 @@ public:
};
inline std::string cxType::String(void) const {
- if (mType != string)
- return (const char*)itoa(mNumber);
- return mString;
+ switch (mType) {
+ case number: return (const char*)itoa(mNumber);
+ case boolean: return mNumber != 0 ? "1" : "";
+ default: return mString;
+ }
}
inline cxType::operator bool () const
{
switch (mType) {
- case string:
- return mString != "";
- default:
- return mNumber != 0;
+ case string: return mString != "";
+ default: return mNumber != 0;
}
}