Commit Graph

87 Commits

Author SHA1 Message Date
glx22 66dd7c3879
Fix: MSVC warnings (#7423) 2019-03-28 00:09:33 +01:00
Henry Wilson ab711e6942 Codechange: Replaced SmallVector::[Begin|End]() with std alternatives 2019-03-26 20:15:57 +00:00
Henry Wilson bfd79e59dc Codechange: Replace SmallVector::Clear() with std::vector::clear() 2019-03-26 20:15:57 +00:00
Henry Wilson 4b349c0f90 Codechange: [core] Implement SmallVector using std::vector
The public and protected interface to SmallVector are unchanged
SmallVector now requires that items be default constructible
This isn't an issue since some contained items were previously created
uninitialized.

Temporary default constructors are added to the following structs
- SmallPair
- SmallStackItem
- GRFPresence

Where vector<bool> is required, transition immediately to std::vector
to avoid returning proxy object references.
2019-03-26 20:15:57 +00:00
peter1138 317f69c152 Codechange: Use override specifier in Window-derived classes. 2019-03-24 16:10:04 +01:00
PeterN 4feea8db67
Fix: Filtered file list did not scroll properly. (#7402) 2019-03-23 17:59:19 +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
peter1138 69928df3f0 Fix: Resorting file list did not update filtered rows. 2019-02-22 21:31:46 +00:00
Niels Martin Hansen 0bca363401 Add: Warn before overwriting an existing save file 2019-02-01 21:49:36 +00:00
damfr 868c6f924a Add: Filter box to the save and load windows (#6974)
Save and heightmap names can be filtered.
2018-11-25 20:54:25 +01:00
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 2018-10-31 12:35:54 +01:00
frosch b4b98e5165 (svn r27893) -Codechange: Use fallthrough attribute. (LordAro) 2017-08-13 18:38:42 +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 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 597380e099 (svn r27650) -Codechange: Replace SaveOrLoadMode by FileOperation and DetailedFileType. 2016-09-04 12:57:43 +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 88bdf482c0 (svn r27648) -Codechange: Remove remaining _saveload_mode usage. 2016-09-04 12:56:56 +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 2d7201781b (svn r27646) -Codechange: Move _fios_items variable into the SaveLoadWindow class. 2016-09-04 12:55:54 +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 caf3379746 (svn r27642) -Codechange: FiosGet* file query functions take a destination file list. 2016-09-04 12:54:03 +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 2fa0fdb176 (svn r27638) -Codechange: Move FiosType enum, move and rename SetFiosType function. 2016-09-04 12:47:07 +00:00
alberth 087ed1e999 (svn r27636) -Codechange: Rename FileType to AbstractFileType. 2016-09-04 12:46:07 +00:00
alberth a52864ef27 (svn r27633) -Codechange: Extract _saveload_mode use from BuildFileList 2016-09-04 12:44:42 +00:00
peter1138 0877f892c5 (svn r26960) -Codechange: Draw sort button symbols as sprites, and pad sort buttons with non-static width. 2014-10-05 11:20:02 +00:00
frosch 7ab5a99e37 (svn r26634) -Fix: 'Load' button was not properly enabled/disabled for old savegames without NewGRF information. 2014-06-08 15:49:54 +00:00
rubidium 21f991e235 (svn r26489) -Codechange: properly account for the end of buffers in the file io code instead of assuming MAX_PATH is okay 2014-04-23 21:23:21 +00:00
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
planetmaker 7316b5672c (svn r26428) -Add [FS#5953]: Load button for heightmap list 2014-03-25 21:47:07 +00:00
michi_cc b911f4a452 (svn r25668) -Codechange: Pass proper Unicode UCS-4 characters instead of just UCS-2 to the window key press handlers. 2013-08-05 20:36:24 +00:00
frosch 4e4e635916 (svn r25294) -Feature: Add another button to window title bars to resize the window to its default size. 2013-05-26 19:30:07 +00:00
frosch 8157a8afd8 (svn r25290) -Add: Assign string names to notable windows. 2013-05-26 19:25:01 +00:00
frosch 56e4a8c4d6 (svn r25287) -Codechange: Keep a reference to the WindowDesc in the Window after construction. 2013-05-26 19:23:42 +00:00
frosch 579ee7a592 (svn r25089) -Codechange: Move CharSetFilter from QueryString to Textbuf. 2013-03-17 13:04:10 +00:00
frosch f5d8ba5d7f (svn r24742) -Codechange: Remove QueryStringBaseWindow and store QueryStrings per widget instead. 2012-11-14 22:50:35 +00:00
frosch 6e6d94a2d1 (svn r24740) -Codechange: Remove duplicate members from QueryStringBaseWindow and directly use QueryString. 2012-11-14 22:50:26 +00:00
frosch 6653ac6b36 (svn r24739) -Codechange: Simplify some code by using Textbuf::Assign. 2012-11-14 22:50:21 +00:00
frosch f6d4200f86 (svn r24738) -Codechange: Remove Textbuf::Initialize in favour of a constructor. 2012-11-14 22:50:17 +00:00
frosch c4d7c8dd42 (svn r24733) -Codechange: Move handling of editbox keys to window class. 2012-11-13 21:47:02 +00:00
frosch 7699a7dc06 (svn r24732) -Codechange: Unify handling of OK and CANCEL actions for editboxes. 2012-11-13 21:46:58 +00:00
frosch 137adb3496 (svn r24726) -Codechange: Move editbox mouseloop handling to Window class. 2012-11-13 21:46:33 +00:00
frosch 17025fa6ea (svn r24724) -Codechange: Move drawing of editboxes to the widget drawing code. 2012-11-13 21:46:19 +00:00
frosch 03736af2ae (svn r24700) -Cleanup: Remove WDF_UNCLICK_BUTTONS and make it the default. 2012-11-11 16:10:43 +00:00
frosch d58eee1e79 (svn r24324) -Codechange: Turn functions dealing with Textbufs into member functions. 2012-06-04 15:30:29 +00:00
smatz eb015cbfb6 (svn r23901) -Fix: memory leak everytime one clicked a savegame in the load GUI 2012-02-05 15:51:13 +00:00
truebrain e9f584ac21 (svn r23531) -Codechange: document and rename widgets to be consistent and understandable 2011-12-16 16:27:45 +00:00
truebrain 2aa774e831 (svn r23528) -Codechange: move widget enums to widgets/NNN_type.h 2011-12-15 22:22:55 +00:00
rubidium 420d358fef (svn r23475) -Codechange: queue critical error messages, so when multiple happen you won't miss any 2011-12-10 15:14:11 +00:00
rubidium 58423b26d1 (svn r23474) -Codechange: move the declaration error related functions to error.h 2011-12-10 13:54:10 +00:00