ecere/gui/Window: Prevent uninitialized values if base Window methods not overridden...
[sdk] / extras / types / DynamicString.ec
index 4f68639..4189386 100644 (file)
@@ -4,8 +4,6 @@ public import static "ecere"
 
 #include <stdarg.h>
 
-extern int isblank(int c);
-
 public class DynamicString : Array<char>
 {
    minAllocSize = 1024;
@@ -31,17 +29,18 @@ public class DynamicString : Array<char>
       get { return array; }
    }
 
-   char * OnGetString(char * tempString, void * fieldData, bool * needClass)
+   const char * OnGetString(char * tempString, void * fieldData, bool * needClass)
    {
       return array;
    }
 
-   bool OnGetDataFromString(char * string)
+   bool OnGetDataFromString(const char * string)
    {
-      this = (DynamicString)string;
+      this = (DynamicString)(char *)string;
+      return true;
    }
 
-   void concat(String s)
+   void concat(const String s)
    {
       int len = strlen(s);
       if(len)
@@ -53,7 +52,7 @@ public class DynamicString : Array<char>
       }
    }
 
-   void concatf(char * format, ...)
+   void concatf(const char * format, ...)
    {
       // TODO: improve this to vsprinf directly in the Array<char> instead of calling concat
       char string[MAX_F_STRING];
@@ -70,9 +69,9 @@ public class DynamicString : Array<char>
       // TODO: improve this to work directly on the Array<char> instead of calling PrintStdArgsToBuffer
       char string[MAX_F_STRING];
       va_list args;
-      int len;
+      //int len;
       va_start(args, object);
-      len = PrintStdArgsToBuffer(string, sizeof(string), object, args);
+      /*len = */PrintStdArgsToBuffer(string, sizeof(string), object, args);
       concat(string);
       va_end(args);
    }