Commit Graph

15 Commits (master)

Author SHA1 Message Date
Tushar Maheshwari a661eab867 Automatic fixes using clang-tidy for header files
A follow-up on a previous PR GH-41. The discussion in the forum can be
viewed at http://forum.openclonk.org/topic_show.pl?pid=33086.
Run clang-tidy (without auto, pass-by-value and using checks) to fix the
header files not modified in the previous PR.

Summary of the changes:

 - C++11 member initialization.
 - nullptr instead of 0 for pointers.
 - override for functions declared virtual in base class.
 - default trivial special member functions
2017-05-15 13:46:46 +02:00
Sven Eberhardt ebda8193ef Replace NULL by nullptr in C++ sources
We don't support pre-C++0x any more, so nullptr should be fine everywhere (except in the plain C source files)
2016-11-02 19:58:02 -04:00
Nicolas Hake 021a6e89f5 Implement direct execution of whole function definitions
This implements the changes made in c6e4bfd on the AST-based parser.
2016-10-19 14:20:47 +02:00
Nicolas Hake 3217fbf55b C4AulScriptFunc::AddPar: Accept type in addition to name
This way, we don't have to first add the parameter and then set the type
afterwards via internal members.
2016-05-13 16:22:00 +02:00
Nicolas Hake c8d71d47c0 C4CodeGen: Rename to C4AulCompiler
I need to split up C4CodeGen into smaller parts, and having the bit that
actually generates the bytecode named C4CodeGenCodeGen would be silly.
2016-05-09 12:21:33 +02:00
Günther Brammer b8f2d0ca87 Script: Repeat the parser error message when executing a broken function 2016-05-01 00:28:37 +02:00
Günther Brammer 4092911349 Move code generation into its own class 2016-04-28 03:25:47 +02:00
Günther Brammer b00b8554ab Merge branch script 2016-04-28 03:25:44 +02:00
Günther Brammer e22ca51f72 Don't leak references to Strings on script errors (#583) 2016-04-24 19:40:27 +02:00
Nicolas Hake 19a3d43558 Fix definition of explicitly sized enums 2016-04-24 15:20:28 +02:00
Nicolas Hake eabca223f5 Update all copyright notices for 2016 2016-04-03 20:24:42 +02:00
Nicolas Hake 493c276126 Rewrite header inclusions to #include "path/to/file.h" style 2016-04-03 20:24:42 +02:00
Günther Brammer 168ac8bb40 Remove pointer to start of variables from function context
It pointed always to Pars + Func->GetParCount(). The only users were
VARN_CONTEXT, which can be replaced with PARN_CONTEXT that way, and
FOREACH_NEXT, where the parser can do the math and simply give a number
relative to the current stack position, like regular variable usages do.
2016-02-02 02:57:48 +01:00
Günther Brammer 5bb3d7cb77 Use a null C4ScriptHost to parse DirectExec code
This mostly makes Parse_Expression use the case for functions in proplists
instead of the other for local variable lookup.
2016-02-02 02:57:48 +01:00
Günther Brammer 4c01592196 Move C4AulScriptFunc into its own source file 2016-01-24 12:27:23 +01:00