Commit Graph

23724 Commits

Author SHA1 Message Date
Henry Wilson
81315939b9 Codechange: Replaced SmallVector::Find() non-const with std::find() 2019-03-26 20:15:57 +00:00
Henry Wilson
f3938fdb83 Codechange: Replaced SmallVector::Reset() with std::vector::clear() + shrink_to_fit() 2019-03-26 20:15:57 +00:00
Henry Wilson
bad2c2154b Codechange: Replaced SmallVector::Resize() with std::vector::resize() 2019-03-26 20:15:57 +00:00
Henry Wilson
a690936ed7 Codechange: Replace SmallVector::Length() with std::vector::size() 2019-03-26 20:15:57 +00:00
Henry Wilson
56ae855dc2 Codechange: Removed SmallVector::operator[] 2019-03-26 20:15:57 +00:00
Henry Wilson
9cba6f7193 Codechange: Replaced SmallVector::Compact() with std::vector::shrink_to_fit() 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
translators
7a32cf1401 Update: Translations from eints
greek: 51 changes by Jubilee
russian: 17 changes by Lone_Wolf
latin: 19 changes by Supercheese
portuguese: 53 changes by JayCity
2019-03-26 19:45:43 +01:00
PeterN
e3ea758c46
Fix #7414: Reinstate marking sign dirty before removal. (#7416) 2019-03-25 23:24:40 +00:00
stormcone
8acca3a72b Change: Do not display a newspaper about old vehicles for which replacement is activated. 2019-03-25 23:41:06 +01:00
PeterN
698241e16e
Fix #7410: Sign position/width not set on initial creation. (#7413)
Sign width was only updated when the text was changed. This seems to work for player-placed
signs as there is always a rename operation, however AIs can create a sign with text in one
go, in which case the width was never set.
2019-03-25 20:01:55 +00:00
PeterN
a4073895ae
Fix #7411: Use industry production callback (if used) on initial industry cargo generation. (#7412) 2019-03-25 19:30:23 +00:00
translators
10f0c1e3cd Update: Translations from eints
finnish: 12 changes by hpiirai
greek: 40 changes by Jubilee
luxembourgish: 2 changes by Phreeze
dutch: 12 changes by JanWillem
french: 4 changes by romazoon
norwegian (bokmal): 12 changes by Leifbk
hungarian: 14 changes by Brumi
portuguese: 51 changes by JayCity, 11 changes by vesgo
2019-03-25 19:45:45 +01:00
translators
37b9fdc0c1 Update: Translations from eints
finnish: 13 changes by hpiirai
korean: 1 change by telk5093
2019-03-24 19:45:44 +01:00
Niels Martin Hansen
ce10d9be3f Fix #7374: Ensure k-d trees are always updated when station sign moves 2019-03-24 19:26:13 +01:00
peter1138
3860a2ce2a Codechange: Use override keyword for smallmap window. 2019-03-24 17:38:42 +00:00
peter1138
07de9d6c3f Codechange: Use override keyword in networking classes. 2019-03-24 17:38:42 +00:00
peter1138
b1fb3f4fb8 Codechange: More use of override keyword. 2019-03-24 17:38:42 +00:00
peter1138
e6bb90543e Change: Show additional cost and refitted capacity in build vehicle window. 2019-03-24 15:28:48 +00:00
glx
f8e6cd10ef Add: script API functions for build with refit feature 2019-03-24 15:28:48 +00:00
peter1138
d54b6ac09b Feature: When filtering purchase list by cargo type, make buy button perform a refit if required. 2019-03-24 15:28:48 +00:00
Peter Nelson
f6264e5212 Change: Bump savegame version for tree tile water class conversion. 2019-03-24 15:16:54 +00:00
Peter Nelson
76e77aefad Fix #7400: Water class for tree tiles was not converted for old saves preventing industry creation.
As the information is always available from the tree ground type, unconditionally
update the map array for tree tiles.
2019-03-24 15:16:54 +00:00
peter1138
317f69c152 Codechange: Use override specifier in Window-derived classes. 2019-03-24 16:10:04 +01:00
peter1138
aafce47596 Codechange: Use override specifier for DropDownListItem classes. 2019-03-24 16:10:04 +01:00
Henry Wilson
af7d9020a1 Codechange: Use override specifer for overriding member declarations
This is a C++11 feature that allows the compiler to check that a virtual
member declaration overrides a base-class member with the same signature.

Also src/blitter/32bpp_anim_sse4.hpp +38 is no longer erroneously marked
as virtual despite being a template.
2019-03-24 16:10:04 +01:00
Henry Wilson
31260e6625 Cleanup: Stop OSX compilation complaining about C++11 extensions 2019-03-24 16:10:04 +01:00
translators
685f822c63 Update: Translations from eints
finnish: 13 changes by hpiirai
danish: 2 changes by nielsmh
2019-03-23 19:45:42 +01:00
PeterN
4feea8db67
Fix: Filtered file list did not scroll properly. (#7402) 2019-03-23 17:59:19 +00:00
translators
d755375966 Update: Translations from eints
luxembourgish: 31 changes by Phreeze
croatian: 2 changes by VoyagerOne
2019-03-22 19:45:43 +01:00
Peter Nelson
3357cac847 Fix: Bounds check NewGRF feature. 2019-03-21 20:53:36 +00:00
Peter Nelson
054d05b132 Codechange: NewGRF features are documented in hex, so display as hex. 2019-03-21 20:53:36 +00:00
Michael Lutz
2cf7ac2863 Fix #7391, 9b99b95: Don't invalidate go to depot orders of non-aircraft when invalidating hangar orders that happen to share IDs.
This was caused because hangars are referred to by station ID, which is not unique with respect to depot IDs.
2019-03-21 19:15:59 +00:00
peter1138
1585c12bb9 Fix 4da83d2f66: Remove measurement tooltips when completed. 2019-03-21 19:14:41 +00:00
translators
0837a1a398 Update: Translations from eints
dutch: 28 changes by JanWillem
russian: 1 change by Lone_Wolf
2019-03-21 19:45:42 +01:00
peter1138
c34f07d5fd Fix #7390: Extra line removed by mistake caused server_password to disappear from settings. 2019-03-20 23:55:38 +00:00
peter1138
b3ef06fdf3 Fix #7384: Industry Chain tooltips did not display on right-click.
This is fixed by handling the new Window::OnTooltip() event instead of OnHover()
2019-03-20 23:00:32 +00:00
peter1138
f5f33da126 Codechange: Implement OnTooltip event for custom window tooltips.
This avoids windows from needing to know or care about tooltip delay settings.
2019-03-20 23:00:32 +00:00
peter1138
4da83d2f66 Fix #7386: Measurement tooltip for tunnels, aqueducts & docks did not display or flickered.
Measurement tooltip was auto-closed as the hover/right-click test for tooltips was not
satisfied in this case. This is fixed by keeping the tooltip visible and instead explicitly
closing the tooltip when the PlaceObject is cancelled/completed.
2019-03-20 23:00:32 +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
Patric Stout
72c5f2b3ee Remove: DOS support
In 10 years there was no active development on DOS. Although it
turned out to still work, the FPS was very bad. There is little
interest in the current community to look into this.

Further more, we like to switch to c++11 functions for threads,
which are not implemented by DJGPP, the only current compiler
for DOS.

Additionally, DOS is the only platform which does not support
networking. It is the reason we have tons of #ifdefs to support
disabling networking.

By removing DOS support, we can both use c++11 functions for threads,
and remove all the code related to disabling network. Sadly, this
means we have to see DOS go.

Of course, if you feel up for the task, simply revert this commit,
and implement stub c++11 functions for threads and stub functions
for networking. We are more than happy to accept such Pull Request.
2019-03-19 23:22:51 +01:00
translators
559d4e8335 Update: Translations from eints
korean: 7 changes by telk5093
2019-03-19 19:45:46 +01:00
Patric Stout
fe13fadcfb Codechange: fix Intel C++ Compiler linking issues.
GetAircraftFlightLevel<Aircraft> is only used in static functions
inside aircraft_cmd.cpp. With GCC, Clang and MSVC this is not an
issue, but on ICC fails linking, because it doesn't find this
version of this template. Possibly these two pieces of information
are linked.
Explicit defining the function fixes the issue.
2019-03-18 20:57:32 +01:00
stormcone
43caef2968 Fix f58fa80e: Wrong company performance rating when money exceeds INT_MAX. (#7382)
Company performance rating calculation does not take into account the companies' money when those exceeds INT_MAX.
2019-03-17 21:28:37 +01:00
translators
c66b9c657a Update: Translations from eints
dutch: 1 change by JanWillem
russian: 1 change by Lone_Wolf
2019-03-17 19:45:44 +01:00
Charles Pigott
592f591a4b Cleanup: Unused lang strings 2019-03-16 22:30:11 +00:00
Charles Pigott
fe448a2616 Remove: OPF 2019-03-16 22:30:11 +00:00
translators
c7b5f34138 Update: Translations from eints
norwegian (bokmal): 1 change by Leifbk
2019-03-16 19:45:41 +01:00
PeterN
bcfc9620b0 Change: Use default value for invalid multi-string settings instead of clamping to min or max value. (#7361) 2019-03-16 16:52:07 +00:00