|
From: <pst...@us...> - 2011-08-04 23:41:13
|
Revision: 864
http://jazzplusplus.svn.sourceforge.net/jazzplusplus/?rev=864&view=rev
Author: pstieber
Date: 2011-08-04 23:41:07 +0000 (Thu, 04 Aug 2011)
Log Message:
-----------
Updated some string code.
Modified Paths:
--------------
trunk/jazz/src/DeprecatedWx/prop.cpp
trunk/jazz/src/DeprecatedWx/prop.h
Modified: trunk/jazz/src/DeprecatedWx/prop.cpp
===================================================================
--- trunk/jazz/src/DeprecatedWx/prop.cpp 2011-08-04 20:29:50 UTC (rev 863)
+++ trunk/jazz/src/DeprecatedWx/prop.cpp 2011-08-04 23:41:07 UTC (rev 864)
@@ -637,7 +637,7 @@
// void wxPropertyValue::operator=(const char *val)
void wxPropertyValue::operator=(const wxString& val1)
{
- const wxChar *val = (const wxChar *)val1;
+ const wxChar *val = val1.c_str();
m_modifiedFlag = true;
@@ -1226,7 +1226,7 @@
wxPropertyValidator::~wxPropertyValidator(void)
{}
-bool wxPropertyValidator::StringToFloat (wxChar *s, float *number)
+bool wxPropertyValidator::StringToFloat (const wxString& s, float *number)
{
double num;
bool ok = StringToDouble (s, &num);
@@ -1234,7 +1234,7 @@
return ok;
}
-bool wxPropertyValidator::StringToDouble (wxChar *s, double *number)
+bool wxPropertyValidator::StringToDouble (const wxString& s, double *number)
{
bool ok = true;
wxChar *value_ptr;
@@ -1251,7 +1251,7 @@
return ok;
}
-bool wxPropertyValidator::StringToInt (wxChar *s, int *number)
+bool wxPropertyValidator::StringToInt (const wxString& s, int *number)
{
long num;
bool ok = StringToLong (s, &num);
@@ -1259,7 +1259,7 @@
return ok;
}
-bool wxPropertyValidator::StringToLong (wxChar *s, long *number)
+bool wxPropertyValidator::StringToLong (const wxString& s, long *number)
{
bool ok = true;
wxChar *value_ptr;
Modified: trunk/jazz/src/DeprecatedWx/prop.h
===================================================================
--- trunk/jazz/src/DeprecatedWx/prop.h 2011-08-04 20:29:50 UTC (rev 863)
+++ trunk/jazz/src/DeprecatedWx/prop.h 2011-08-04 23:41:07 UTC (rev 864)
@@ -195,10 +195,10 @@
return m_validatorProperty;
}
- virtual bool StringToFloat (wxChar *s, float *number);
- virtual bool StringToDouble (wxChar *s, double *number);
- virtual bool StringToInt (wxChar *s, int *number);
- virtual bool StringToLong (wxChar *s, long *number);
+ virtual bool StringToFloat (const wxString& s, float *number);
+ virtual bool StringToDouble (const wxString& s, double *number);
+ virtual bool StringToInt (const wxString& s, int *number);
+ virtual bool StringToLong (const wxString& s, long *number);
virtual wxChar *FloatToString (float number);
virtual wxChar *DoubleToString (double number);
virtual wxChar *IntToString (int number);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|