Last .empty() string source cleaning before 2.5.4.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -803,7 +803,7 @@ wxDateTime::wxDateTime_t wxDateTime::GetNumberOfDays(wxDateTime::Month month,
|
|||||||
wxString wxDateTime::GetMonthName(wxDateTime::Month month,
|
wxString wxDateTime::GetMonthName(wxDateTime::Month month,
|
||||||
wxDateTime::NameFlags flags)
|
wxDateTime::NameFlags flags)
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( month != Inv_Month, _T(""), _T("invalid month") );
|
wxCHECK_MSG( month != Inv_Month, wxEmptyString, _T("invalid month") );
|
||||||
|
|
||||||
// notice that we must set all the fields to avoid confusing libc (GNU one
|
// notice that we must set all the fields to avoid confusing libc (GNU one
|
||||||
// gets confused to a crash if we don't do this)
|
// gets confused to a crash if we don't do this)
|
||||||
@@ -818,7 +818,7 @@ wxString wxDateTime::GetMonthName(wxDateTime::Month month,
|
|||||||
wxString wxDateTime::GetWeekDayName(wxDateTime::WeekDay wday,
|
wxString wxDateTime::GetWeekDayName(wxDateTime::WeekDay wday,
|
||||||
wxDateTime::NameFlags flags)
|
wxDateTime::NameFlags flags)
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( wday != Inv_WeekDay, _T(""), _T("invalid weekday") );
|
wxCHECK_MSG( wday != Inv_WeekDay, wxEmptyString, _T("invalid weekday") );
|
||||||
|
|
||||||
// take some arbitrary Sunday (but notice that the day should be such that
|
// take some arbitrary Sunday (but notice that the day should be such that
|
||||||
// after adding wday to it below we still have a valid date, e.g. don't
|
// after adding wday to it below we still have a valid date, e.g. don't
|
||||||
@@ -2068,7 +2068,7 @@ wxDateTime& wxDateTime::MakeTimezone(const TimeZone& tz, bool noDST)
|
|||||||
|
|
||||||
wxString wxDateTime::Format(const wxChar *format, const TimeZone& tz) const
|
wxString wxDateTime::Format(const wxChar *format, const TimeZone& tz) const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( format, _T(""), _T("NULL format in wxDateTime::Format") );
|
wxCHECK_MSG( format, wxEmptyString, _T("NULL format in wxDateTime::Format") );
|
||||||
|
|
||||||
// we have to use our own implementation if the date is out of range of
|
// we have to use our own implementation if the date is out of range of
|
||||||
// strftime() or if we use non standard specificators
|
// strftime() or if we use non standard specificators
|
||||||
@@ -3849,7 +3849,7 @@ enum TimeSpanPart
|
|||||||
// %l milliseconds (000 - 999)
|
// %l milliseconds (000 - 999)
|
||||||
wxString wxTimeSpan::Format(const wxChar *format) const
|
wxString wxTimeSpan::Format(const wxChar *format) const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( format, _T(""), _T("NULL format in wxTimeSpan::Format") );
|
wxCHECK_MSG( format, wxEmptyString, _T("NULL format in wxTimeSpan::Format") );
|
||||||
|
|
||||||
wxString str;
|
wxString str;
|
||||||
str.Alloc(wxStrlen(format));
|
str.Alloc(wxStrlen(format));
|
||||||
|
@@ -288,7 +288,7 @@ void wxStringHashTable::Put(long key, const wxString& value)
|
|||||||
|
|
||||||
wxString wxStringHashTable::Get(long key, bool *wasFound) const
|
wxString wxStringHashTable::Get(long key, bool *wasFound) const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( m_hashSize, _T(""), _T("must call Create() first") );
|
wxCHECK_MSG( m_hashSize, wxEmptyString, _T("must call Create() first") );
|
||||||
|
|
||||||
size_t slot = (size_t)abs((int)(key % (long)m_hashSize));
|
size_t slot = (size_t)abs((int)(key % (long)m_hashSize));
|
||||||
|
|
||||||
@@ -311,7 +311,7 @@ wxString wxStringHashTable::Get(long key, bool *wasFound) const
|
|||||||
if ( wasFound )
|
if ( wasFound )
|
||||||
*wasFound = false;
|
*wasFound = false;
|
||||||
|
|
||||||
return _T("");
|
return wxEmptyString;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxStringHashTable::Delete(long key) const
|
bool wxStringHashTable::Delete(long key) const
|
||||||
|
@@ -1226,7 +1226,7 @@ void wxMsgCatalogFile::FillHash(wxMessagesHash& hash,
|
|||||||
{
|
{
|
||||||
#if wxUSE_WCHAR_T
|
#if wxUSE_WCHAR_T
|
||||||
wxCSConv *csConv = NULL;
|
wxCSConv *csConv = NULL;
|
||||||
if ( !m_charset.IsEmpty() )
|
if ( !m_charset.empty() )
|
||||||
csConv = new wxCSConv(m_charset);
|
csConv = new wxCSConv(m_charset);
|
||||||
|
|
||||||
wxMBConv& inputConv = csConv ? *((wxMBConv*)csConv) : *wxConvCurrent;
|
wxMBConv& inputConv = csConv ? *((wxMBConv*)csConv) : *wxConvCurrent;
|
||||||
@@ -1462,7 +1462,7 @@ bool wxLocale::Init(const wxChar *szName,
|
|||||||
|
|
||||||
// the short name will be used to look for catalog files as well,
|
// the short name will be used to look for catalog files as well,
|
||||||
// so we need something here
|
// so we need something here
|
||||||
if ( m_strShort.IsEmpty() ) {
|
if ( m_strShort.empty() ) {
|
||||||
// FIXME I don't know how these 2 letter abbreviations are formed,
|
// FIXME I don't know how these 2 letter abbreviations are formed,
|
||||||
// this wild guess is surely wrong
|
// this wild guess is surely wrong
|
||||||
if ( szLocale && szLocale[0] )
|
if ( szLocale && szLocale[0] )
|
||||||
@@ -1637,7 +1637,7 @@ bool wxLocale::Init(int language, int flags)
|
|||||||
if (codepage != 0)
|
if (codepage != 0)
|
||||||
locale << wxT(".") << buffer;
|
locale << wxT(".") << buffer;
|
||||||
}
|
}
|
||||||
if (locale.IsEmpty())
|
if (locale.empty())
|
||||||
{
|
{
|
||||||
wxLogLastError(wxT("SetThreadLocale"));
|
wxLogLastError(wxT("SetThreadLocale"));
|
||||||
wxLogError(wxT("Cannot set locale to language %s."), name.c_str());
|
wxLogError(wxT("Cannot set locale to language %s."), name.c_str());
|
||||||
@@ -2545,14 +2545,14 @@ wxString wxLocale::GetHeaderValue( const wxChar* szHeader,
|
|||||||
if ( pMsgCat == NULL )
|
if ( pMsgCat == NULL )
|
||||||
return wxEmptyString;
|
return wxEmptyString;
|
||||||
|
|
||||||
pszTrans = pMsgCat->GetString(wxT(""), (size_t)-1);
|
pszTrans = pMsgCat->GetString(wxEmptyString, (size_t)-1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// search in all domains
|
// search in all domains
|
||||||
for ( pMsgCat = m_pMsgCat; pMsgCat != NULL; pMsgCat = pMsgCat->m_pNext )
|
for ( pMsgCat = m_pMsgCat; pMsgCat != NULL; pMsgCat = pMsgCat->m_pNext )
|
||||||
{
|
{
|
||||||
pszTrans = pMsgCat->GetString(wxT(""), (size_t)-1);
|
pszTrans = pMsgCat->GetString(wxEmptyString, (size_t)-1);
|
||||||
if ( pszTrans != NULL ) // take the first found
|
if ( pszTrans != NULL ) // take the first found
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -141,7 +141,7 @@ wxAcceleratorEntry *wxGetAccelFromString(const wxString& label)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( current.IsEmpty() ) {
|
if ( current.empty() ) {
|
||||||
wxLogDebug(wxT("No accel key found, accel string ignored."));
|
wxLogDebug(wxT("No accel key found, accel string ignored."));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -706,7 +706,7 @@ wxString wxMenuBase::GetLabel( int id ) const
|
|||||||
{
|
{
|
||||||
wxMenuItem *item = FindItem(id);
|
wxMenuItem *item = FindItem(id);
|
||||||
|
|
||||||
wxCHECK_MSG( item, wxT(""), wxT("wxMenu::GetLabel: no such item") );
|
wxCHECK_MSG( item, wxEmptyString, wxT("wxMenu::GetLabel: no such item") );
|
||||||
|
|
||||||
return item->GetText();
|
return item->GetText();
|
||||||
}
|
}
|
||||||
@@ -724,7 +724,7 @@ wxString wxMenuBase::GetHelpString( int id ) const
|
|||||||
{
|
{
|
||||||
wxMenuItem *item = FindItem(id);
|
wxMenuItem *item = FindItem(id);
|
||||||
|
|
||||||
wxCHECK_MSG( item, wxT(""), wxT("wxMenu::GetHelpString: no such item") );
|
wxCHECK_MSG( item, wxEmptyString, wxT("wxMenu::GetHelpString: no such item") );
|
||||||
|
|
||||||
return item->GetHelp();
|
return item->GetHelp();
|
||||||
}
|
}
|
||||||
|
@@ -196,7 +196,7 @@ wxString wxFileType::ExpandCommand(const wxString& command,
|
|||||||
// know of the correct solution, try to guess what we have to do.
|
// know of the correct solution, try to guess what we have to do.
|
||||||
|
|
||||||
// test now carried out on reading file so test should never get here
|
// test now carried out on reading file so test should never get here
|
||||||
if ( !hasFilename && !str.IsEmpty()
|
if ( !hasFilename && !str.empty()
|
||||||
#ifdef __UNIX__
|
#ifdef __UNIX__
|
||||||
&& !str.StartsWith(_T("test "))
|
&& !str.StartsWith(_T("test "))
|
||||||
#endif // Unix
|
#endif // Unix
|
||||||
@@ -428,7 +428,7 @@ bool wxFileType::SetDefaultIcon(const wxString& cmd, int index)
|
|||||||
// VZ: should we do this?
|
// VZ: should we do this?
|
||||||
// chris elliott : only makes sense in MS windows
|
// chris elliott : only makes sense in MS windows
|
||||||
if ( sTmp.empty() )
|
if ( sTmp.empty() )
|
||||||
GetOpenCommand(&sTmp, wxFileType::MessageParameters(wxT(""), wxT("")));
|
GetOpenCommand(&sTmp, wxFileType::MessageParameters(wxEmptyString, wxEmptyString));
|
||||||
#endif
|
#endif
|
||||||
wxCHECK_MSG( !sTmp.empty(), false, _T("need the icon file") );
|
wxCHECK_MSG( !sTmp.empty(), false, _T("need the icon file") );
|
||||||
|
|
||||||
|
@@ -56,7 +56,7 @@ const wxClassInfo* wxObject::ms_classParents[] = { NULL } ;
|
|||||||
{ return &data.wxTEMPLATED_MEMBER_CALL(Get , wxObject) ; }
|
{ return &data.wxTEMPLATED_MEMBER_CALL(Get , wxObject) ; }
|
||||||
wxxVariant wxObjectToVariantConverterwxObject ( wxObject *data )
|
wxxVariant wxObjectToVariantConverterwxObject ( wxObject *data )
|
||||||
{ return wxxVariant( dynamic_cast<wxObject*> (data) ) ; }
|
{ return wxxVariant( dynamic_cast<wxObject*> (data) ) ; }
|
||||||
wxClassInfo wxObject::ms_classInfo(ms_classParents , wxT("") , wxT("wxObject"),
|
wxClassInfo wxObject::ms_classInfo(ms_classParents , wxEmptyString , wxT("wxObject"),
|
||||||
(int) sizeof(wxObject), \
|
(int) sizeof(wxObject), \
|
||||||
(wxObjectConstructorFn) 0 ,
|
(wxObjectConstructorFn) 0 ,
|
||||||
(wxPropertyInfo*) NULL,(wxHandlerInfo*) NULL,0 , 0 ,
|
(wxPropertyInfo*) NULL,(wxHandlerInfo*) NULL,0 , 0 ,
|
||||||
|
@@ -59,7 +59,7 @@ wxPrintPaperType::wxPrintPaperType()
|
|||||||
{
|
{
|
||||||
m_paperId = wxPAPER_NONE;
|
m_paperId = wxPAPER_NONE;
|
||||||
m_platformId = 0;
|
m_platformId = 0;
|
||||||
m_paperName = wxT("");
|
m_paperName = wxEmptyString;
|
||||||
m_width = 0;
|
m_width = 0;
|
||||||
m_height = 0;
|
m_height = 0;
|
||||||
}
|
}
|
||||||
|
@@ -141,7 +141,7 @@ wxIPV4address::~wxIPV4address()
|
|||||||
bool wxIPV4address::Hostname(const wxString& name)
|
bool wxIPV4address::Hostname(const wxString& name)
|
||||||
{
|
{
|
||||||
// Some people are sometimes fool.
|
// Some people are sometimes fool.
|
||||||
if (name == wxT(""))
|
if (name.empty())
|
||||||
{
|
{
|
||||||
wxLogWarning( _("Trying to solve a NULL hostname: giving up") );
|
wxLogWarning( _("Trying to solve a NULL hostname: giving up") );
|
||||||
return false;
|
return false;
|
||||||
@@ -245,7 +245,7 @@ wxIPV6address::~wxIPV6address()
|
|||||||
|
|
||||||
bool wxIPV6address::Hostname(const wxString& name)
|
bool wxIPV6address::Hostname(const wxString& name)
|
||||||
{
|
{
|
||||||
if (name == wxT(""))
|
if (name.empty())
|
||||||
{
|
{
|
||||||
wxLogWarning( _("Trying to solve a NULL hostname: giving up") );
|
wxLogWarning( _("Trying to solve a NULL hostname: giving up") );
|
||||||
return false;
|
return false;
|
||||||
|
@@ -86,7 +86,7 @@ enum
|
|||||||
|
|
||||||
// get the address object for the given server name, the caller must delete it
|
// get the address object for the given server name, the caller must delete it
|
||||||
static wxSockAddress *
|
static wxSockAddress *
|
||||||
GetAddressFromName(const wxString& serverName, const wxString& host = _T(""))
|
GetAddressFromName(const wxString& serverName, const wxString& host = wxEmptyString)
|
||||||
{
|
{
|
||||||
// we always use INET sockets under non-Unix systems
|
// we always use INET sockets under non-Unix systems
|
||||||
#if defined(__UNIX__) && !defined(__WXMAC__) && !defined(__WINE__)
|
#if defined(__UNIX__) && !defined(__WXMAC__) && !defined(__WINE__)
|
||||||
|
@@ -563,7 +563,7 @@ bool wxToolBarBase::GetToolEnabled(int id) const
|
|||||||
wxString wxToolBarBase::GetToolShortHelp(int id) const
|
wxString wxToolBarBase::GetToolShortHelp(int id) const
|
||||||
{
|
{
|
||||||
wxToolBarToolBase *tool = FindById(id);
|
wxToolBarToolBase *tool = FindById(id);
|
||||||
wxCHECK_MSG( tool, _T(""), _T("no such tool") );
|
wxCHECK_MSG( tool, wxEmptyString, _T("no such tool") );
|
||||||
|
|
||||||
return tool->GetShortHelp();
|
return tool->GetShortHelp();
|
||||||
}
|
}
|
||||||
@@ -571,7 +571,7 @@ wxString wxToolBarBase::GetToolShortHelp(int id) const
|
|||||||
wxString wxToolBarBase::GetToolLongHelp(int id) const
|
wxString wxToolBarBase::GetToolLongHelp(int id) const
|
||||||
{
|
{
|
||||||
wxToolBarToolBase *tool = FindById(id);
|
wxToolBarToolBase *tool = FindById(id);
|
||||||
wxCHECK_MSG( tool, _T(""), _T("no such tool") );
|
wxCHECK_MSG( tool, wxEmptyString, _T("no such tool") );
|
||||||
|
|
||||||
return tool->GetLongHelp();
|
return tool->GetLongHelp();
|
||||||
}
|
}
|
||||||
|
@@ -63,7 +63,7 @@ const wxChar *wxTextBuffer::GetEOL(wxTextFileType type)
|
|||||||
wxFAIL_MSG(wxT("bad buffer type in wxTextBuffer::GetEOL."));
|
wxFAIL_MSG(wxT("bad buffer type in wxTextBuffer::GetEOL."));
|
||||||
// fall through nevertheless - we must return something...
|
// fall through nevertheless - we must return something...
|
||||||
|
|
||||||
case wxTextFileType_None: return wxT("");
|
case wxTextFileType_None: return wxEmptyString;
|
||||||
case wxTextFileType_Unix: return wxT("\n");
|
case wxTextFileType_Unix: return wxT("\n");
|
||||||
case wxTextFileType_Dos: return wxT("\r\n");
|
case wxTextFileType_Dos: return wxT("\r\n");
|
||||||
case wxTextFileType_Mac: return wxT("\r");
|
case wxTextFileType_Mac: return wxT("\r");
|
||||||
|
@@ -79,7 +79,7 @@ wxURI::~wxURI()
|
|||||||
void wxURI::Clear()
|
void wxURI::Clear()
|
||||||
{
|
{
|
||||||
m_scheme = m_user = m_server = m_port = m_path =
|
m_scheme = m_user = m_server = m_port = m_path =
|
||||||
m_query = m_fragment = wxT("");
|
m_query = m_fragment = wxEmptyString;
|
||||||
|
|
||||||
m_hostType = wxURI_REGNAME;
|
m_hostType = wxURI_REGNAME;
|
||||||
|
|
||||||
@@ -401,7 +401,7 @@ const wxChar* wxURI::ParseScheme(const wxChar* uri)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
//relative uri with relative path reference
|
//relative uri with relative path reference
|
||||||
m_scheme = wxT("");
|
m_scheme = wxEmptyString;
|
||||||
}
|
}
|
||||||
// else
|
// else
|
||||||
//relative uri with _possible_ relative path reference
|
//relative uri with _possible_ relative path reference
|
||||||
@@ -450,7 +450,7 @@ const wxChar* wxURI::ParseUser(const wxChar* uri)
|
|||||||
uricopy = ++uri;
|
uricopy = ++uri;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_user = wxT("");
|
m_user = wxEmptyString;
|
||||||
|
|
||||||
return uricopy;
|
return uricopy;
|
||||||
}
|
}
|
||||||
|
@@ -119,7 +119,7 @@
|
|||||||
wxChar *
|
wxChar *
|
||||||
copystring (const wxChar *s)
|
copystring (const wxChar *s)
|
||||||
{
|
{
|
||||||
if (s == NULL) s = wxT("");
|
if (s == NULL) s = wxEmptyString;
|
||||||
size_t len = wxStrlen (s) + 1;
|
size_t len = wxStrlen (s) + 1;
|
||||||
|
|
||||||
wxChar *news = new wxChar[len];
|
wxChar *news = new wxChar[len];
|
||||||
@@ -281,7 +281,7 @@ const wxChar *wxGetInstallPrefix()
|
|||||||
#ifdef wxINSTALL_PREFIX
|
#ifdef wxINSTALL_PREFIX
|
||||||
return wxT(wxINSTALL_PREFIX);
|
return wxT(wxINSTALL_PREFIX);
|
||||||
#else
|
#else
|
||||||
return wxT("");
|
return wxEmptyString;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -164,7 +164,7 @@ bool wxVariantDataList::Write(wxSTD ostream& str) const
|
|||||||
|
|
||||||
bool wxVariantDataList::Write(wxString& str) const
|
bool wxVariantDataList::Write(wxString& str) const
|
||||||
{
|
{
|
||||||
str = wxT("");
|
str = wxEmptyString;
|
||||||
wxList::compatibility_iterator node = m_value.GetFirst();
|
wxList::compatibility_iterator node = m_value.GetFirst();
|
||||||
while (node)
|
while (node)
|
||||||
{
|
{
|
||||||
@@ -1769,7 +1769,7 @@ wxString wxVariant::MakeString() const
|
|||||||
if (GetData()->Write(str))
|
if (GetData()->Write(str))
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
return wxString(wxT(""));
|
return wxEmptyString;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Accessors
|
// Accessors
|
||||||
|
@@ -1376,7 +1376,7 @@ wxWindowBase::FindWindowByName(const wxString& title, const wxWindow *parent)
|
|||||||
wxWindow *
|
wxWindow *
|
||||||
wxWindowBase::FindWindowById( long id, const wxWindow* parent )
|
wxWindowBase::FindWindowById( long id, const wxWindow* parent )
|
||||||
{
|
{
|
||||||
return wxFindWindowHelper(parent, _T(""), id, wxFindWindowCmpIds);
|
return wxFindWindowHelper(parent, wxEmptyString, id, wxFindWindowCmpIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -2232,7 +2232,7 @@ void wxWindowBase::OnMiddleClick( wxMouseEvent& event )
|
|||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
_T(" Debug build"),
|
_T(" Debug build"),
|
||||||
#else
|
#else
|
||||||
_T(""),
|
wxEmptyString,
|
||||||
#endif
|
#endif
|
||||||
__TDATE__,
|
__TDATE__,
|
||||||
__TTIME__
|
__TTIME__
|
||||||
|
@@ -501,7 +501,7 @@ int WXDLLEXPORT wxVsnprintf_(wxChar *buf, size_t lenMax,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
val = wxT("");
|
val = wxEmptyString;
|
||||||
len = 0;
|
len = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -658,12 +658,12 @@ int vswscanf(const wxChar *ws, const wxChar *format, va_list argptr)
|
|||||||
// convert the strings into MB representation and run ANSI version
|
// convert the strings into MB representation and run ANSI version
|
||||||
// of the function. This doesn't work with %c and %s because of difference
|
// of the function. This doesn't work with %c and %s because of difference
|
||||||
// in size of char and wchar_t, though.
|
// in size of char and wchar_t, though.
|
||||||
|
|
||||||
wxCHECK_MSG( wxStrstr(format, _T("%s")) == NULL, -1,
|
wxCHECK_MSG( wxStrstr(format, _T("%s")) == NULL, -1,
|
||||||
_T("incomplete vswscanf implementation doesn't allow %s") );
|
_T("incomplete vswscanf implementation doesn't allow %s") );
|
||||||
wxCHECK_MSG( wxStrstr(format, _T("%c")) == NULL, -1,
|
wxCHECK_MSG( wxStrstr(format, _T("%c")) == NULL, -1,
|
||||||
_T("incomplete vswscanf implementation doesn't allow %c") );
|
_T("incomplete vswscanf implementation doesn't allow %c") );
|
||||||
|
|
||||||
va_list argcopy;
|
va_list argcopy;
|
||||||
wxVaCopy(argcopy, argptr);
|
wxVaCopy(argcopy, argptr);
|
||||||
return vsscanf(wxConvLibc.cWX2MB(ws), wxConvLibc.cWX2MB(format), argcopy);
|
return vsscanf(wxConvLibc.cWX2MB(ws), wxConvLibc.cWX2MB(format), argcopy);
|
||||||
@@ -1070,7 +1070,7 @@ WXDLLEXPORT int wxTolower(wxChar ch) { return (wxChar)CharLower((LPTSTR)(ch)); }
|
|||||||
WXDLLEXPORT int wxToupper(wxChar ch) { return (wxChar)CharUpper((LPTSTR)(ch)); }
|
WXDLLEXPORT int wxToupper(wxChar ch) { return (wxChar)CharUpper((LPTSTR)(ch)); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__DARWIN__) && ( MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_2 )
|
#if defined(__DARWIN__) && ( MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_2 )
|
||||||
|
|
||||||
WXDLLEXPORT size_t wxInternalMbstowcs (wchar_t * out, const char * in, size_t outlen)
|
WXDLLEXPORT size_t wxInternalMbstowcs (wchar_t * out, const char * in, size_t outlen)
|
||||||
{
|
{
|
||||||
@@ -1081,16 +1081,16 @@ WXDLLEXPORT size_t wxInternalMbstowcs (wchar_t * out, const char * in, size_t ou
|
|||||||
outsize++;
|
outsize++;
|
||||||
return outsize;
|
return outsize;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* origin = in;
|
const char* origin = in;
|
||||||
|
|
||||||
while (outlen-- && *in)
|
while (outlen-- && *in)
|
||||||
{
|
{
|
||||||
*out++ = (wchar_t) *in++;
|
*out++ = (wchar_t) *in++;
|
||||||
}
|
}
|
||||||
|
|
||||||
*out = '\0';
|
*out = '\0';
|
||||||
|
|
||||||
return in - origin;
|
return in - origin;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1103,19 +1103,19 @@ WXDLLEXPORT size_t wxInternalWcstombs (char * out, const wchar_t * in, size_t ou
|
|||||||
outsize++;
|
outsize++;
|
||||||
return outsize;
|
return outsize;
|
||||||
}
|
}
|
||||||
|
|
||||||
const wchar_t* origin = in;
|
const wchar_t* origin = in;
|
||||||
|
|
||||||
while (outlen-- && *in)
|
while (outlen-- && *in)
|
||||||
{
|
{
|
||||||
*out++ = (char) *in++;
|
*out++ = (char) *in++;
|
||||||
}
|
}
|
||||||
|
|
||||||
*out = '\0';
|
*out = '\0';
|
||||||
|
|
||||||
return in - origin;
|
return in - origin;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(wxNEED_WX_CTYPE_H)
|
#if defined(wxNEED_WX_CTYPE_H)
|
||||||
|
|
||||||
#include <CoreFoundation/CoreFoundation.h>
|
#include <CoreFoundation/CoreFoundation.h>
|
||||||
@@ -1267,7 +1267,7 @@ WXDLLEXPORT size_t wxStrlen_(const wxChar *s)
|
|||||||
size_t n = 0;
|
size_t n = 0;
|
||||||
while ( *s++ )
|
while ( *s++ )
|
||||||
n++;
|
n++;
|
||||||
|
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -88,7 +88,7 @@ const wxChar *wxEnumData::GetEnumMemberName(int value) const
|
|||||||
if (value == m_members[i].m_value)
|
if (value == m_members[i].m_value)
|
||||||
return m_members[i].m_name;
|
return m_members[i].m_name;
|
||||||
|
|
||||||
return wxT("") ;
|
return wxEmptyString ;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxEnumData::GetEnumMemberValueByIndex( int idx ) const
|
int wxEnumData::GetEnumMemberValueByIndex( int idx ) const
|
||||||
@@ -318,13 +318,13 @@ void wxTypeInfo::Register()
|
|||||||
if ( ms_typeTable == NULL )
|
if ( ms_typeTable == NULL )
|
||||||
ms_typeTable = new wxTypeInfoMap() ;
|
ms_typeTable = new wxTypeInfoMap() ;
|
||||||
|
|
||||||
if( !m_name.IsEmpty() )
|
if( !m_name.empty() )
|
||||||
(*ms_typeTable)[m_name] = this ;
|
(*ms_typeTable)[m_name] = this ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTypeInfo::Unregister()
|
void wxTypeInfo::Unregister()
|
||||||
{
|
{
|
||||||
if( !m_name.IsEmpty() )
|
if( !m_name.empty() )
|
||||||
ms_typeTable->erase(m_name);
|
ms_typeTable->erase(m_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user