Commit Graph

26 Commits

Author SHA1 Message Date
Rubidium eaae0bb5e7 Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
Rubidium 3323402aaa Codechange: rename smallvec_type to container_func and use only when needed 2023-05-20 16:53:10 +02:00
Patric Stout 66dc0ce196 Codechange: C++-ify the usage of IniFile in settings.cpp
Instead of creating the object on heap and use a pointer, create
the object on stack and use a guaranteed-not-null pointer.
The size of IniFile doesn't warrent the forcing to heap.

Additionally, use a subclass instead of a function to do some
initial bookkeeping on an IniFile meant to read a configuration.
2021-07-02 14:30:14 +02:00
Patric Stout d70fb74ac6
Codechange: use setting name instead of index for CmdChange(Company)Setting (#9306)
This is mostly done as there are now constraints on settings.ini you might not
expected. For example, conditional settings always have to come last, as otherwise
they would influence the index.
2021-05-29 23:27:01 +02:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Michael Lutz e804173595 Codechange: If something is a vector of strings, use a vector of strings instead of an AutoFreeSmallVector. 2019-04-09 22:45:15 +02:00
Henry Wilson cc62f4163f Cleanup: Remove unused size template parameters from SmallMap and Auto[Free|Delete]SmallVector 2019-03-26 20:15:57 +00:00
Patric Stout e3c639a09f Remove: ENABLE_NETWORK switch
This switch has been a pain for years. Often disabling broke
compilation, as no developer compiles OpenTTD without, neither do
any of our official binaries.

Additionaly, it has grown so hugely in our codebase, that it
clearly shows that the current solution was a poor one. 350+
instances of "#ifdef ENABLE_NETWORK" were in the code, of which
only ~30 in the networking code itself. The rest were all around
the code to do the right thing, from GUI to NewGRF.

A more proper solution would be to stub all the functions, and
make sure the rest of the code can simply assume network is
available. This was also partially done, and most variables were
correct if networking was disabled. Despite that, often the #ifdefs
were still used.

With the recent removal of DOS, there is also no platform anymore
which we support where networking isn't working out-of-the-box.

All in all, it is time to remove the ENABLE_NETWORK switch. No
replacement is planned, but if you feel we really need this option,
we welcome any Pull Request which implements this in a way that
doesn't crawl through the code like this diff shows we used to.
2019-03-20 19:24:55 +01:00
Charles Pigott fe448a2616 Remove: OPF 2019-03-16 22:30:11 +00:00
frosch 23ba42b66c (svn r25291) -Add: WindowDesc ability to load and store information in a config file. 2013-05-26 19:27:22 +00:00
rubidium 834eac49fd (svn r23224) -Codechange: first load the config file partially so we can push scanning AIs to later in the process (when the GUI is showing the progress bar) 2011-11-14 21:42:54 +00:00
alberth 9f5a96ead2 (svn r20689) -Codechange: Make some global functions used in 1 .cpp file static in that file. 2010-08-29 15:58:43 +00:00
smatz 5eb1e3d033 (svn r19577) -Codechange: apply coding style to names of functions in settings.cpp 2010-04-07 20:28:02 +00:00
alberth 1e48b2332e (svn r19576) -Codechange: Unduplicating parse_intlist(). 2010-04-07 20:09:53 +00:00
yexo d75b9f1642 (svn r18943) -Feature [FS#2885]: make it possible to change newgame settings from within a game via the console (use setting_newgame instead of setting) 2010-01-28 23:17:28 +00:00
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 2010-01-15 16:41:15 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
smatz 3eb8f643fb (svn r16554) -Fix (r16433): compilation with disabled network was broken 2009-06-10 18:53:43 +00:00
yexo d982ec81df (svn r16444) -Codechange: Set all company settings to their default value for a new company instead of zeroing them. 2009-05-26 23:14:02 +00:00
yexo 2a5a8f395c (svn r16433) -Codechange: Remove most of CmdSetAutoreplace and replace it with calls to CmdChangeCompanySetting 2009-05-26 13:29:01 +00:00
rubidium 377ce6c5bf (svn r15410) -Cleanup: get rid of most of the references to the 'patches' except where it's used for backward compatability. 2009-02-08 12:25:13 +00:00
glx 16aac30c66 (svn r14041) -Feature(tte): make it possible to filter list_patches output like it's done for other list_* console commands 2008-08-11 17:15:31 +00:00
peter1138 6e0af9fdfe (svn r13781) -Feature: NewGRF presets, selected by a drop down list in the NewGRF window. Presets are saved in the config file. 2008-07-22 14:17:29 +00:00
rubidium 00ccb1dc33 (svn r13341) -Codechange: make most of the network settings configurable via the patch command. 2008-05-30 09:23:05 +00:00
rubidium 495ca8fdb9 (svn r13277) -Fix: opntitle 'jumping' to the temperate climate when closing the NewGRF settings window. 2008-05-26 21:38:17 +00:00
rubidium acc7c9eb01 (svn r11771) -Codechange: split settings.h into better separated headers. 2008-01-07 00:19:09 +00:00