Fixes to allow compilation with wxUSE_STD_STRING
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33416 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
7215f534ad
commit
42389ac7c3
@ -1621,7 +1621,11 @@ bool CJSourceParser::ParseNameAndRetVal( char*& cur, bool& isAMacro )
|
||||
if ( cur >= start )
|
||||
{
|
||||
string rettype = string( start, size_t( cur-start ) );
|
||||
rettype.Replace("WXDLLEXPORT ", ""); // FIXME just for now...
|
||||
// FIXME just for now...
|
||||
string::size_type pos = 0;
|
||||
string toerase("WXDLLEXPORT ");
|
||||
while((pos = rettype.find(toerase, pos)) != string::npos)
|
||||
rettype.erase(pos, toerase.length());
|
||||
pOp->mRetType = rettype;
|
||||
}
|
||||
|
||||
@ -1912,11 +1916,11 @@ void CJSourceParser::ParseMemberVar( char*& cur )
|
||||
if ( !pAttr )
|
||||
continue;
|
||||
|
||||
if ( !pAttr->mType )
|
||||
if ( pAttr->mType.empty() )
|
||||
pAttr->mType = type;
|
||||
pAttr->mVisibility = mCurVis;
|
||||
|
||||
if ( !!pAttr->mName )
|
||||
if ( !pAttr->mName.empty() )
|
||||
arrange_indirection_tokens_between( pAttr->mType, pAttr->mName );
|
||||
}
|
||||
|
||||
|
@ -267,7 +267,7 @@ void spInterFileContext::WriteToFiles()
|
||||
{
|
||||
FILE* fp = fopen( mFiles[i].c_str(), "w+t" );
|
||||
|
||||
if ( int(fp) > 0 )
|
||||
if ( fp != NULL )
|
||||
{
|
||||
fwrite( mContents[i].c_str(), sizeof(char), mContents[i].length(), fp );
|
||||
|
||||
|
@ -591,7 +591,7 @@ bool DocGeneratorBase::SaveDocument( const char* fname,
|
||||
{
|
||||
FILE* fp = fopen( fname, fopenOptions );
|
||||
|
||||
if ( (int)fp == -1 ) return 0;
|
||||
if ( !fp ) return 0;
|
||||
|
||||
ScriptStream stm;
|
||||
|
||||
|
@ -28,8 +28,12 @@
|
||||
#include "wxstlvec.h"
|
||||
#include "wx/string.h"
|
||||
|
||||
// FIXME:: dirty!
|
||||
typedef wxString string;
|
||||
#ifdef wxUSE_STD_STRING
|
||||
using std::string;
|
||||
#else
|
||||
// FIXME:: dirty!
|
||||
typedef wxString string;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -32,8 +32,12 @@
|
||||
#include "wxstlvec.h"
|
||||
#include "wx/string.h"
|
||||
|
||||
// FIXME:: dirty!
|
||||
#define string wxString
|
||||
#ifdef wxUSE_STD_STRING
|
||||
using std::string;
|
||||
#else
|
||||
// FIXME:: dirty!
|
||||
#define string wxString
|
||||
#endif
|
||||
|
||||
typedef WXSTL_VECTOR_SHALLOW_COPY(int) SPBlockListT;
|
||||
|
||||
|
@ -533,7 +533,7 @@ spFile* SourceParserBase::ParseFile( const char* fname )
|
||||
|
||||
FILE* fp = fopen( fname, "rt" );
|
||||
|
||||
if ( (int)fp == -1 || !fp ) return NULL;
|
||||
if ( !fp ) return NULL;
|
||||
|
||||
int sz = fread( mpFileBuf, 1, mFileBufSz, fp );
|
||||
|
||||
@ -587,7 +587,7 @@ void spAttribute::DumpThis(const wxString& indent) const
|
||||
void spOperation::DumpThis(const wxString& indent) const
|
||||
{
|
||||
wxString protection;
|
||||
if ( !!mScope ) {
|
||||
if ( !mScope.empty() ) {
|
||||
switch ( mVisibility ) {
|
||||
case SP_VIS_PUBLIC:
|
||||
protection = "public";
|
||||
|
@ -30,9 +30,12 @@
|
||||
#include "wx/string.h"
|
||||
#include "wxstlvec.h"
|
||||
|
||||
// FOR NOW:: quick n' dirty:
|
||||
|
||||
#define string wxString
|
||||
#ifdef wxUSE_STD_STRING
|
||||
using std::string;
|
||||
#else
|
||||
// FOR NOW:: quick n' dirty:
|
||||
#define string wxString
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user