From 9f249cfff9422c71d65df65f8adc8218eb47bda3 Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 16 Sep 2014 20:08:44 +0000 Subject: (svn r26836) -Fix [Squirrel]: merge SQLexer::Init with the constructor; there's no need to construct first and then call init in the next line --- src/3rdparty/squirrel/squirrel/sqcompiler.cpp | 3 +-- src/3rdparty/squirrel/squirrel/sqlexer.cpp | 3 +-- src/3rdparty/squirrel/squirrel/sqlexer.h | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/3rdparty/squirrel/squirrel/sqcompiler.cpp b/src/3rdparty/squirrel/squirrel/sqcompiler.cpp index bafbe42d9..1b3906de3 100644 --- a/src/3rdparty/squirrel/squirrel/sqcompiler.cpp +++ b/src/3rdparty/squirrel/squirrel/sqcompiler.cpp @@ -57,10 +57,9 @@ typedef sqvector ExpStateVec; class SQCompiler { public: - SQCompiler(SQVM *v, SQLEXREADFUNC rg, SQUserPointer up, const SQChar* sourcename, bool raiseerror, bool lineinfo) + SQCompiler(SQVM *v, SQLEXREADFUNC rg, SQUserPointer up, const SQChar* sourcename, bool raiseerror, bool lineinfo) : _lex(_ss(v), rg, up,ThrowError,this) { _vm=v; - _lex.Init(_ss(v), rg, up,ThrowError,this); _sourcename = SQString::Create(_ss(v), sourcename); _lineinfo = lineinfo;_raiseerror = raiseerror; } diff --git a/src/3rdparty/squirrel/squirrel/sqlexer.cpp b/src/3rdparty/squirrel/squirrel/sqlexer.cpp index cd0cb5ff4..aa19845ad 100644 --- a/src/3rdparty/squirrel/squirrel/sqlexer.cpp +++ b/src/3rdparty/squirrel/squirrel/sqlexer.cpp @@ -21,7 +21,6 @@ #define NEXT() {Next();_currentcolumn++;} #define ADD_KEYWORD(key,id) _keywords->NewSlot( SQString::Create(ss, #key) ,SQInteger(id)) -SQLexer::SQLexer(){} SQLexer::~SQLexer() { _keywords->Release(); @@ -36,7 +35,7 @@ void SQLexer::APPEND_CHAR(WChar c) } } -void SQLexer::Init(SQSharedState *ss, SQLEXREADFUNC rg, SQUserPointer up,CompilerErrorFunc efunc,void *ed) +SQLexer::SQLexer(SQSharedState *ss, SQLEXREADFUNC rg, SQUserPointer up,CompilerErrorFunc efunc,void *ed) { _errfunc = efunc; _errtarget = ed; diff --git a/src/3rdparty/squirrel/squirrel/sqlexer.h b/src/3rdparty/squirrel/squirrel/sqlexer.h index 878748b9e..b53b309d6 100644 --- a/src/3rdparty/squirrel/squirrel/sqlexer.h +++ b/src/3rdparty/squirrel/squirrel/sqlexer.h @@ -4,9 +4,8 @@ struct SQLexer { - SQLexer(); ~SQLexer(); - void Init(SQSharedState *ss,SQLEXREADFUNC rg,SQUserPointer up,CompilerErrorFunc efunc,void *ed); + SQLexer(SQSharedState *ss,SQLEXREADFUNC rg,SQUserPointer up,CompilerErrorFunc efunc,void *ed); NORETURN void Error(const SQChar *err); SQInteger Lex(); const SQChar *Tok2Str(SQInteger tok); -- cgit v1.2.3-70-g09d2