summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2010-10-24 13:08:55 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2010-10-24 13:08:55 +0200
commit1c5ece6100d7dcb1015187a7e3ae73b41d509b16 (patch)
tree311941102526e2ab645bd38ad77918c27d4e1588 /tools.c
parentfbbcb8e9c88901b4a583fb688718b3dc6a5ceea2 (diff)
downloadvdr-1c5ece6100d7dcb1015187a7e3ae73b41d509b16.tar.gz
vdr-1c5ece6100d7dcb1015187a7e3ae73b41d509b16.tar.bz2
Added cString::operator=(const char *String)
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools.c b/tools.c
index 09053301..f7d6bc6d 100644
--- a/tools.c
+++ b/tools.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 2.9 2010/10/24 11:32:27 kls Exp $
+ * $Id: tools.c 2.10 2010/10/24 13:07:30 kls Exp $
*/
#include "tools.h"
@@ -885,6 +885,13 @@ cString &cString::operator=(const cString &String)
return *this;
}
+cString &cString::operator=(const char *String)
+{
+ free(s);
+ s = String ? strdup(String) : NULL;
+ return *this;
+}
+
cString &cString::Truncate(int Index)
{
int l = strlen(s);