diff options
author | rubidium <rubidium@openttd.org> | 2014-09-16 20:08:44 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2014-09-16 20:08:44 +0000 |
commit | 9f249cfff9422c71d65df65f8adc8218eb47bda3 (patch) | |
tree | 1aaf10e513c7e538e46d97360e3e12f562b91a87 /src | |
parent | 0d0c4461cea937e82267cb08d069fccc269e8ffa (diff) | |
download | openttd-9f249cfff9422c71d65df65f8adc8218eb47bda3.tar.xz |
(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
Diffstat (limited to 'src')
-rw-r--r-- | src/3rdparty/squirrel/squirrel/sqcompiler.cpp | 3 | ||||
-rw-r--r-- | src/3rdparty/squirrel/squirrel/sqlexer.cpp | 3 | ||||
-rw-r--r-- | src/3rdparty/squirrel/squirrel/sqlexer.h | 3 |
3 files changed, 3 insertions, 6 deletions
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<ExpState> 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); |