Jonathan G Rennison
8e8d7e93d5
Tidy up legacy-compatibility code in PATX/PLYX handlers.
...
Use lambdas instead of manual emulation.
Move an inner struct back into its owner function.
2016-09-05 23:31:26 +01:00
Jonathan G Rennison
a6e0b1ac7d
Merge branch 'cpp-11' into save_ext
2016-09-05 23:17:02 +01:00
Jonathan G Rennison
f7af8b8bdc
Silence -Wunused-variable warnings in src/table/townname.h
2016-09-05 23:16:47 +01:00
Jonathan G Rennison
6e9ea59ab5
Add a simple scope guard include file.
2016-09-05 23:16:47 +01:00
Jonathan G Rennison
bb6ea150a3
Use likely/__builtin_expect for assertion macros.
...
(cherry picked from commit f82002cda2
)
2016-09-05 22:46:01 +01:00
Jonathan G Rennison
0b7d68a6d1
Add support for verbose asserts.
...
(cherry picked from commit 48e4c35fdc
)
2016-09-05 22:46:01 +01:00
Jonathan G Rennison
51099c3572
Unconditionally use static_assert.
2016-09-05 22:46:01 +01:00
Jonathan G Rennison
2fe7571034
Require C++11 support.
...
Set minimum compiler versions to:
GCC 4.7
clang 3.3
ICC 14.0
2016-09-05 22:45:57 +01:00
cirdan
e6122f5ce4
Remove ZeroedMemoryAllocator from ScriptText
...
Have ScriptText initialise all of its members on construction and
not derive from ZeroedMemoryAllocator.
(cherry picked from commit 3240126202d3437396004f2d5b0371783effb1ea)
Reorder ScriptText constructor initialisers.
2016-09-05 22:41:36 +01:00
cirdan
80fd6a2783
Drop memory allocator from ClientNetworkGameSocketHandler
...
Have ClientNetworkGameSocketHandler initialise all of its members
on construction and not derive from ZeroedMemoryAllocator.
(cherry picked from commit dddda4f0b7ba0bd6f310f924d3b85cadbc81dc99)
2016-09-05 22:35:15 +01:00
cirdan
33e3956b13
Remove ZeroedMemoryAllocator from WindowDesc
...
All fields are initialised in the constructor, plus no WindowDesc
is ever constructed via operator new.
(cherry picked from commit 94750756bfbf8ab5ca36e6a38f6f7b556ca31b32)
2016-09-05 22:34:48 +01:00
frosch
533cb7c156
(svn r27654) -Change: Enable C++11 for clang 3.3 (LordAro)
2016-09-05 19:11:01 +00:00
frosch
ac6793dace
(svn r27654) -Change: Enable C++11 for clang 3.3 (LordAro)
2016-09-05 19:11:01 +00:00
Jonathan G Rennison
871d26098e
Move Order::cargo_type_flags into a separately allocated object.
...
Change savegame format, add a new chunk for cargo_type_flags.
2016-09-05 00:12:48 +01:00
Jonathan G Rennison
3507b51d9e
Initial LinkRefresher support for cargo-specific links.
2016-09-05 00:12:48 +01:00
Jonathan G Rennison
a670966acf
Change GetNextStoppingStation to return per-cargo result(s).
2016-09-05 00:12:48 +01:00
Jonathan G Rennison
ed99dd2583
Change name of Order cargo-typed get load/unload type accessors.
...
Move helper functions to get cargo-specific type in cargo-specific
mode, into Order class.
2016-09-05 00:12:48 +01:00
Jonathan G Rennison
7178ef22e5
Adjust order line load/unload by cargo type strings.
2016-09-04 23:00:10 +01:00
Jonathan G Rennison
c1c983ea16
Import cargo type orders patch
...
https://www.tt-forums.net/viewtopic.php?p=1047749#p1047749
Port to current trunk, resolve various conflicts, etc.
Adjust bit allocations for CmdModifyOrder.
Use save_ext framework for added order flags.
2016-09-04 23:00:10 +01:00
Jonathan G Rennison
8deac54c9f
Remove mutex from SmallStack/StationIDStack.
...
It is only ever used from the main thread.
2016-09-04 23:00:10 +01:00
Jonathan G Rennison
349cd8a6f0
Where possible use compiler builtins for CountBits and FindFirstBit.
2016-09-04 18:01:38 +01:00
alberth
f286ba8db2
(svn r27653) -Fix(r27647): Rename FileOperation enum and values to SaveLoadOperation to avoid nameclash with windows compiler toolkit.
2016-09-04 16:06:50 +00:00
alberth
0adfb1ac6f
(svn r27653) -Fix(r27647): Rename FileOperation enum and values to SaveLoadOperation to avoid nameclash with windows compiler toolkit.
2016-09-04 16:06:50 +00:00
alberth
0b8869930f
(svn r27652) -Fix(r27650): Use the file operation being performed to set the _sl.action variable.
2016-09-04 15:10:41 +00:00
alberth
4001f6215e
(svn r27652) -Fix(r27650): Use the file operation being performed to set the _sl.action variable.
2016-09-04 15:10:41 +00:00
alberth
e735bbebce
(svn r27651) -Codechange: Introduce methods for setting the name and title of _file_to_saveload.
2016-09-04 12:58:04 +00:00
alberth
6f201ce4a8
(svn r27651) -Codechange: Introduce methods for setting the name and title of _file_to_saveload.
2016-09-04 12:58:04 +00:00
alberth
a959c0c965
(svn r27650) -Codechange: Replace SaveOrLoadMode by FileOperation and DetailedFileType.
2016-09-04 12:57:43 +00:00
alberth
597380e099
(svn r27650) -Codechange: Replace SaveOrLoadMode by FileOperation and DetailedFileType.
2016-09-04 12:57:43 +00:00
alberth
c3bed437ee
(svn r27649) -Codechange: Introduce detailed file type enum, rebuild FiosType with it.
2016-09-04 12:57:20 +00:00
alberth
df9a9f074a
(svn r27649) -Codechange: Introduce detailed file type enum, rebuild FiosType with it.
2016-09-04 12:57:20 +00:00
alberth
3b84827773
(svn r27648) -Codechange: Remove remaining _saveload_mode usage.
2016-09-04 12:56:56 +00:00
alberth
88bdf482c0
(svn r27648) -Codechange: Remove remaining _saveload_mode usage.
2016-09-04 12:56:56 +00:00
alberth
ec2b2fad58
(svn r27647) -Codechange: Introduce file operations, and use it to replace most of SaveLoadDialogMode
2016-09-04 12:56:23 +00:00
alberth
75ad6d0100
(svn r27647) -Codechange: Introduce file operations, and use it to replace most of SaveLoadDialogMode
2016-09-04 12:56:23 +00:00
alberth
ac72a6b1ed
(svn r27646) -Codechange: Move _fios_items variable into the SaveLoadWindow class.
2016-09-04 12:55:54 +00:00
alberth
2d7201781b
(svn r27646) -Codechange: Move _fios_items variable into the SaveLoadWindow class.
2016-09-04 12:55:54 +00:00
alberth
76cd96e709
(svn r27645) -Add: Give console commands their own file list storage.
2016-09-04 12:55:21 +00:00
alberth
5969685954
(svn r27645) -Add: Give console commands their own file list storage.
2016-09-04 12:55:21 +00:00
alberth
8a9e9f838b
(svn r27644) -Codechange: Split GetFiosItem into BuildFileList and FindItem, and move both to FileList.
2016-09-04 12:54:52 +00:00
alberth
d6cd3b1605
(svn r27644) -Codechange: Split GetFiosItem into BuildFileList and FindItem, and move both to FileList.
2016-09-04 12:54:52 +00:00
alberth
f618c0d0a5
(svn r27643) -Codechange: FiosGetDrives function also takes a destination file list.
2016-09-04 12:54:30 +00:00
alberth
95bb103a23
(svn r27643) -Codechange: FiosGetDrives function also takes a destination file list.
2016-09-04 12:54:30 +00:00
alberth
93baf192a0
(svn r27642) -Codechange: FiosGet* file query functions take a destination file list.
2016-09-04 12:54:03 +00:00
alberth
caf3379746
(svn r27642) -Codechange: FiosGet* file query functions take a destination file list.
2016-09-04 12:54:03 +00:00
alberth
a38cdeccc0
(svn r27641) -Codechange: Fold the _fios_items file list vector into its own class.
2016-09-04 12:50:22 +00:00
alberth
bc08fe7c5f
(svn r27641) -Codechange: Fold the _fios_items file list vector into its own class.
2016-09-04 12:50:22 +00:00
alberth
c530f89761
(svn r27640) -Codechange: Remove another use of _saveload_mode in the loading code.
2016-09-04 12:48:28 +00:00
alberth
0bf3372882
(svn r27640) -Codechange: Remove another use of _saveload_mode in the loading code.
2016-09-04 12:48:28 +00:00
alberth
b6c29ae4eb
(svn r27639) -Codechange: Also always set the abstract FileToSaveLoad::filetype when setting a mode.
2016-09-04 12:47:39 +00:00