Commit Graph

28 Commits (60841c1d96073b0adbb687f29dfc059619ad3919)

Author SHA1 Message Date
Lukas Werling 60841c1d96 Write text files with unix file endings
The old LineFeed constant caused problems with Qt. Using \n directly is
easier and I don't think there's a reason left to use \r\n anyways.
We've always converted the files in the repository. Nowadays, even
notepad.exe works with unix file endings.
2019-02-19 15:28:12 +01:00
Julius Michaelis e4adb0fd76 Fix StdCompilerINIWrite/19c1badfa 2017-08-25 15:10:28 +02:00
Julius Michaelis 19c1badfa6 Fix StdCompilerINIWrite/08714a67f 2017-08-24 16:40:05 +02:00
Julius Michaelis 08714a67f8 Mess up StdCompilerINIWrite in an attempt to fix #1921 2017-08-15 05:50:38 +02:00
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
Tushar Maheshwari 3a4f49ad90 Revisit #includes
Consolidate the include statements scattered across the code in accordance
with the comment in C4Include.h. The advantages are listed in the same
comment.
Furthermore, it follows llvm-include-order which is the logical
extrapolation of the project's style guideline wherever possible
(C4Include.h being the most-frequent exception).
2017-05-15 13:24:59 +02:00
Tushar Maheshwari e58a7884e4 Automatic fixes using clang-tidy
See http://forum.openclonk.org/topic_show.pl?tid=3376 for discussion.

Close GH-41
2017-05-03 20:30:45 +02:00
Sven Eberhardt 66117de82f Fix Windows config writing of custom key overloads 2017-03-26 20:55:27 -04:00
Nicolas Hake 78b43e2182 StdCompiler: Add support for std::string 2017-03-23 16:35:25 +01: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
Linus Heckemann 25fd930242 Fix some malloc/free mismatches
Discovered with valgrind. Previously, some memory that later gets freed using
free(...) (in StdBuf::Clear) was allocated with new char[...] rather than
malloc, in which case delete[] should be used to free them.
2016-04-17 20:13:33 +01: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
Jan Heberer 7f1ed15344 Fix clamping of unsigned 16-bit integers in StdCompilerINIRead
Clamp unsigned 16-bit integers to the range 0 to 65535 instead of 0 to 32767
2016-01-02 17:00:36 -08:00
Nicolas Hake a405dcdf4c StdCompilerINIRead: Maintain line break cache for error msgs (#1310)
Deserializing proplists tries to read a boolean variable from the
representation in order to be backwards compatible to old (<6.0)
savegames. Newer savegames do not write this boolean, so StdCompiler
(correctly) throws an exception. This exception uses line numbers, which
StdCompiler used to obtain by scanning through the entire buffer. Having
to scan through the entire buffer for every serialized proplist is
ridiculously slow (and the data isn't used anyway in this instance).
Since line information is still valuable outside of proplist
deserialization, replace the repeated SGetLine calls with an on-demand
cache.
This reduces load times of a 14 MB Game.txt from slightly over 3 minutes
to 7 seconds on my computer.
2015-05-10 20:52:35 +02:00
Nicolas Hake 5562b09dc4 Remove a lot of disabled legacy code, round 2
Maybe at some point we'll be rid of all the commented-out code that
nobody has looked at in years.
2015-03-25 20:02:53 +01:00
Nicolas Hake e21a5bdd44 Rename BoundBy to Clamp
"BoundBy" sounds like a predicate. "Clamp" is a common function name for
the operation in graphics processing, so it should be familiar to users.
2015-02-12 23:05:55 +01:00
Sven Eberhardt 378bda5546 Added custom scenario parameters (SCENPAR_*).
Can currently only be set in network games in the lobby. In the future, maybe we can find a place somewhere in the scenario selection dialogue.
2014-09-23 23:02:52 +02:00
Nicolas Hake e0dc30c59a Update copyright notices
As discussed in http://forum.openclonk.org/topic_show.pl?tid=2917, I
have merged all copyright notices into a single file and referenced that
merged file from each source file.

For the updated source files, the timeline has been split into three
parts:
 1. Pre-RWD code (before 2001)
 2. RWD code (2001 through 2009)
 3. OpenClonk code (2009 and later)
All pre-RWD copyright notices have been left intact, as have RWD-era
copyright notices where the file did not have a RedWolf design copyright
notice but only individual author ones. All copyright notices of the
OpenClonk era have been replaced by a single notice ranging from the
first recorded year to the current year (2013). Mape code did not get a
OpenClonk Team copyright notice because it is somewhat separate from the
main OpenClonk codebase and has only been touched by Armin Burgmeier.
2013-12-23 13:03:19 +01:00
Günther Brammer be342d4a51 copyright notices update 2010
This time with more manual checking and using git blame -M -C, so that
a few cases of copied code get a copyright notice corresponding to
their initial introduction.
2010-12-23 01:01:24 +01:00
Peter Wortmann 0c8bac0140 StdCompiler: Removed "compatibility" hack to have RCT_Escaped fallback to RCT_All.
RCT_Escaped is meant to be used when embedding a string into a custom encoding of a structure. That's why it has a terminator symbol and escapes anything that could be interpreted as a seperator. Falling back to RCT_All completely destroys this safeness, as it just blindly copies everything. In case this kind of functionality is really needed, introduce RCT_EscapedAll or something similar.
2010-12-19 01:43:40 +00:00
Armin Burgmeier c2924041c9 Fix seperate->separate everywhere 2010-04-01 23:08:06 +02:00
Benjamin Herr 4378de147c Rerun astyle with missing \ added 2010-03-28 20:58:01 +02:00
Günther Brammer b4e37b070b Change all indentation with spaces to use tabs instead
This is a whitespace-only patch. Hopefully, it'll only affect rarely-changed
parts of the engine, since all regularly maintained pieces should already
use tabs.
2010-03-27 17:05:02 +01:00
Benjamin Herr f3b35227ea avoid lots of gcc warnings 2010-01-25 05:00:59 +01:00
mizipzor a53dae0c1b Fixed compilation in MSVC2010 2009-11-25 19:38:54 +01:00
Nicolas Hake f0fdf5e992 Prepare for precompiled headers 2009-10-20 05:39:24 +02:00
Günther Brammer 572d00c32e Move all source files
This might make stuff easier to find.
2009-08-10 17:59:18 +02:00