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:
@@ -1621,7 +1621,11 @@ bool CJSourceParser::ParseNameAndRetVal( char*& cur, bool& isAMacro )
|
|||||||
if ( cur >= start )
|
if ( cur >= start )
|
||||||
{
|
{
|
||||||
string rettype = string( start, size_t( 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;
|
pOp->mRetType = rettype;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1912,11 +1916,11 @@ void CJSourceParser::ParseMemberVar( char*& cur )
|
|||||||
if ( !pAttr )
|
if ( !pAttr )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if ( !pAttr->mType )
|
if ( pAttr->mType.empty() )
|
||||||
pAttr->mType = type;
|
pAttr->mType = type;
|
||||||
pAttr->mVisibility = mCurVis;
|
pAttr->mVisibility = mCurVis;
|
||||||
|
|
||||||
if ( !!pAttr->mName )
|
if ( !pAttr->mName.empty() )
|
||||||
arrange_indirection_tokens_between( pAttr->mType, pAttr->mName );
|
arrange_indirection_tokens_between( pAttr->mType, pAttr->mName );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -267,7 +267,7 @@ void spInterFileContext::WriteToFiles()
|
|||||||
{
|
{
|
||||||
FILE* fp = fopen( mFiles[i].c_str(), "w+t" );
|
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 );
|
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 );
|
FILE* fp = fopen( fname, fopenOptions );
|
||||||
|
|
||||||
if ( (int)fp == -1 ) return 0;
|
if ( !fp ) return 0;
|
||||||
|
|
||||||
ScriptStream stm;
|
ScriptStream stm;
|
||||||
|
|
||||||
|
@@ -28,8 +28,12 @@
|
|||||||
#include "wxstlvec.h"
|
#include "wxstlvec.h"
|
||||||
#include "wx/string.h"
|
#include "wx/string.h"
|
||||||
|
|
||||||
|
#ifdef wxUSE_STD_STRING
|
||||||
|
using std::string;
|
||||||
|
#else
|
||||||
// FIXME:: dirty!
|
// FIXME:: dirty!
|
||||||
typedef wxString string;
|
typedef wxString string;
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -32,8 +32,12 @@
|
|||||||
#include "wxstlvec.h"
|
#include "wxstlvec.h"
|
||||||
#include "wx/string.h"
|
#include "wx/string.h"
|
||||||
|
|
||||||
|
#ifdef wxUSE_STD_STRING
|
||||||
|
using std::string;
|
||||||
|
#else
|
||||||
// FIXME:: dirty!
|
// FIXME:: dirty!
|
||||||
#define string wxString
|
#define string wxString
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef WXSTL_VECTOR_SHALLOW_COPY(int) SPBlockListT;
|
typedef WXSTL_VECTOR_SHALLOW_COPY(int) SPBlockListT;
|
||||||
|
|
||||||
|
@@ -533,7 +533,7 @@ spFile* SourceParserBase::ParseFile( const char* fname )
|
|||||||
|
|
||||||
FILE* fp = fopen( fname, "rt" );
|
FILE* fp = fopen( fname, "rt" );
|
||||||
|
|
||||||
if ( (int)fp == -1 || !fp ) return NULL;
|
if ( !fp ) return NULL;
|
||||||
|
|
||||||
int sz = fread( mpFileBuf, 1, mFileBufSz, fp );
|
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
|
void spOperation::DumpThis(const wxString& indent) const
|
||||||
{
|
{
|
||||||
wxString protection;
|
wxString protection;
|
||||||
if ( !!mScope ) {
|
if ( !mScope.empty() ) {
|
||||||
switch ( mVisibility ) {
|
switch ( mVisibility ) {
|
||||||
case SP_VIS_PUBLIC:
|
case SP_VIS_PUBLIC:
|
||||||
protection = "public";
|
protection = "public";
|
||||||
|
@@ -30,9 +30,12 @@
|
|||||||
#include "wx/string.h"
|
#include "wx/string.h"
|
||||||
#include "wxstlvec.h"
|
#include "wxstlvec.h"
|
||||||
|
|
||||||
|
#ifdef wxUSE_STD_STRING
|
||||||
|
using std::string;
|
||||||
|
#else
|
||||||
// FOR NOW:: quick n' dirty:
|
// FOR NOW:: quick n' dirty:
|
||||||
|
|
||||||
#define string wxString
|
#define string wxString
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user