Commit Graph

47855 Commits (f5747bf753258574c1bd40aa205b5c250bc30408)
 

Author SHA1 Message Date
Jonathan G Rennison f5747bf753 Merge branch 'master' into jgrpp
# Conflicts:
#	src/genworld_gui.cpp
#	src/group_gui.cpp
#	src/saveload/saveload.cpp
#	src/settings_gui.cpp
#	src/toolbar_gui.cpp
#	src/vehicle_gui.cpp
#	src/vehicle_gui_base.h
#	src/widgets/dropdown.cpp
#	src/widgets/dropdown_type.h
5 years ago
Jonathan G Rennison 8c3d1b1c45 Convert secondary rail types in AfterLoadLabelMaps
Handle missing rail types
5 years ago
glx22 3b4f224c0b
Fix #7494: std::sort() and qsort() use different comparators (#7495) 5 years ago
translators 87d588f22f Update: Translations from eints
luxembourgish: 17 changes by Phreeze
spanish (mexican): 2 changes by njn
5 years ago
Jonathan G Rennison f887b12be2 Add 3rd party mingw-std-threads headers to fix MinGW compilation 5 years ago
Jonathan G Rennison 01f957c51f Fix: Crash due to use of invalid iterator in ClientNetworkContentSocketHandler
In particular this crash can be observed when using the
bootstrap GUI to download the base graphics.

In ClientNetworkContentSocketHandler::OnReceiveContentInfo
ClientNetworkContentSocketHandler::callbacks is iterated, using an iterator
cb->OnReceiveContentInfo() is called (cb is of type BootstrapAskForDownloadWindow)
This calls new BootstrapContentDownloadStatusWindow()
This inherits from BaseNetworkContentDownloadStatusWindow
The constructor of which calls _network_content_client.AddCallback(this)
This reallocates the std::vector which is being iterated in ClientNetworkContentSocketHandler::OnReceiveContentInfo
This results in iter being invalid, and an assertion failure occurs shortly
afterwards due to its use in the next iteration of cb->OnReceiveContentInfo()

Adjust all locations where ClientNetworkContentSocketHandler::callbacks
is iterated to avoid problematic behaviour
5 years ago
Michael Lutz 8b1880187a Remove: AutoFreeSmallVector.
The last use was for storing a list of memory blocks. As the way these lists are accessed is very
specific, it is easier to just write an explicit destructor instead of trying to exactly match the behaviour.
5 years ago
Michael Lutz e804173595 Codechange: If something is a vector of strings, use a vector of strings instead of an AutoFreeSmallVector. 5 years ago
Michael Lutz c7b9987d08 Codechange: Switch DropDownList to directly use std::vector, thus making AutoDeleteSmallVector obsolete.
DropDownListItem are strongly managed using std::unique_ptr to ensure leak-free handling. Appropriate use
of move-semantics make intent a lot clearer than parameter comments and allows the compiler to generate
copy-free code for most situations.
5 years ago
Michael Lutz d3e113eb5f Codechange: Use std::vector instead of AutoDeleteSmallVector in GS text handling. 5 years ago
Michael Lutz baf9229931 Codechange: Replace AutoDeleteSmallVector with direct std::vector use in text layout code. 5 years ago
Michael Lutz 329bb52613 Codechange: Store text layout runs directly as values in a std::vector instead of heap allocated.
This reduces memory allocations and heap fragmentation.
5 years ago
Michael Lutz 9325d63d8e Fix: Forgotten override keywords for DropDownListIconItem. 5 years ago
Michael Lutz fbc4cef180 Codechange: Use override specifier for text layout classes. 5 years ago
Michael Lutz d95c7083ea Fix: Don't crash if reading a GS string file from disk produces an error.
The raw_strings vector may not include NULLs as no consumer can deal with it.
5 years ago
Jonathan G Rennison 58c27ab59e Merge branch 'crashlog_improvements' into jgrpp 5 years ago
Jonathan G Rennison 69d2d3e278 Crashlog: Limit total number of news items 5 years ago
Jonathan G Rennison d5ee9d34da Merge branch 'cpp-11' into crashlog_improvements
# Conflicts:
#	Makefile.src.in
#	projects/determineversion.vbs
#	source.list
#	src/crashlog.cpp
#	src/misc.cpp
#	src/os/unix/crashlog_unix.cpp
#	src/os/windows/crashlog_win.cpp
#	src/rev.h
#	src/thread/thread.h
#	src/thread/thread_morphos.cpp
#	src/thread/thread_none.cpp
#	src/thread/thread_os2.cpp
#	src/thread/thread_pthread.cpp
#	src/thread/thread_win32.cpp
5 years ago
Jonathan G Rennison 361758b516 Merge branches 'crashlog_improvements', 'save_ext' into jgrpp
# Conflicts:
#	Makefile.src.in
#	projects/openttd_vs140.vcxproj
#	projects/openttd_vs140.vcxproj.filters
#	projects/openttd_vs141.vcxproj
#	projects/openttd_vs141.vcxproj.filters
#	projects/openttd_vs142.vcxproj
#	projects/openttd_vs142.vcxproj.filters
#	src/core/smallstack_type.hpp
#	src/linkgraph/linkgraphjob.cpp
#	src/linkgraph/linkgraphjob.h
#	src/misc.cpp
#	src/network/network_udp.cpp
#	src/openttd.cpp
#	src/saveload/saveload.cpp
5 years ago
Jonathan G Rennison 7f80884047 Merge branch 'cpp-11' into save_ext
# Conflicts:
#	src/saveload/saveload.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
5 years ago
Jonathan G Rennison 01261daec0 Merge branch 'master' into cpp-11
# Conflicts:
#	config.lib
5 years ago
translators 0a883afe19 Update: Translations from eints
luxembourgish: 20 changes by Phreeze
5 years ago
Jonathan G Rennison 070160af40 Save point used when adding station to viewport kd tree, use for removal 5 years ago
Jonathan G Rennison 3807f0551d Limit maximum recursion depth in StationViewWindow::EstimateDestinations 5 years ago
PeterN 812886ca61
Fix #7478: Don't remove NewGRF objects on company take-over. (#7483) 5 years ago
kiwitreekor bc9b47d2e5 Fix #6222: Advanced sprite layout sometimes showed incorrect railtype ground tile 5 years ago
Jonathan G Rennison 99055c22cb Fix string format issue in Japanese translation 5 years ago
Jonathan G Rennison c0b402a74c Merge branch 'pr-82' into jgrpp 5 years ago
Jonathan G Rennison 99f3ebe1fd Merge branch 'pr-78' into jgrpp 5 years ago
Jonathan G Rennison 74e5e04724 Fix: Crash due to use of invalid iterator in ClientNetworkContentSocketHandler
In particular this crash can be observed when using the
bootstrap GUI to download the base graphics.

In ClientNetworkContentSocketHandler::OnReceiveContentInfo
ClientNetworkContentSocketHandler::callbacks is iterated, using an iterator
cb->OnReceiveContentInfo() is called (cb is of type BootstrapAskForDownloadWindow)
This calls new BootstrapContentDownloadStatusWindow()
This inherits from BaseNetworkContentDownloadStatusWindow
The constructor of which calls _network_content_client.AddCallback(this)
This reallocates the std::vector which is being iterated in ClientNetworkContentSocketHandler::OnReceiveContentInfo
This results in iter being invalid, and an assertion failure occurs shortly
afterwards due to its use in the next iteration of cb->OnReceiveContentInfo()

Adjust all locations where ClientNetworkContentSocketHandler::callbacks
is iterated to avoid problematic behaviour
5 years ago
nikolas eab8ab40d9
Fix typo in readme: sufficienty -> sufficiently 5 years ago
glx22 3e608afa6c
Fix: [Windows] OpenTTD window may be inactive when an error happens (#7482) 5 years ago
Michael Lutz 967b27a2c1 Codechange: C++11 STL has a function for getting the number of CPU cores. 5 years ago
Michael Lutz ae748166d0 Codechange: Use platform independent C++11 function for sleeping on a thread. 5 years ago
Michael Lutz 94c5269fa7 Codechange: Use atomic variables for thread synchronization where useful. 5 years ago
Michael Lutz 05bc2ed7cb Codechange: Replace custom thread code with C++11 thread objects.
We assume a conforming C++11 compiler environment that has a valid <thread>-header.
Failure to run a real thread is handled gracefully.
5 years ago
Michael Lutz 05f4e73608 Codechange: Replace custom mutex code with C++11 mutex'es.
A conforming compiler with a valid <mutex>-header is expected.
Most parts of the code assume that locking a mutex will never fail unexpectedly,
which is generally true on all common platforms that don't just pretend to
be C++11. The use of condition variables in driver code is checked.
5 years ago
Michael Lutz 3b86f54fc7 Fix: [OSX] .mm files are C++ files, not C files. 5 years ago
glx22 90a91f1d0d
Fix: [MSVC] don't force SDK version (#7474) 5 years ago
glx22 a1e492d0d8
Fix #7439: don't overwrite CompanyRemoveReason with ClientID (#7465) 5 years ago
Samu fb6e31ca43 Cleanup 3f32711: Don't apply forbid 90 deg turn settings for ships. 5 years ago
Jonathan G Rennison a6887d7010 Version: Committing version data for tag: jgrpp-0.30.1 5 years ago
Jonathan G Rennison 4bf4862674 Add AI/game script DoCommand calls to command log 5 years ago
Jonathan G Rennison c3e90b61b7 Merge branch 'master' into jgrpp
# Conflicts:
#	src/vehicle_cmd.cpp
5 years ago
peter1138 8114bad033 Fix #7469: Desync when using build and refit feature. 5 years ago
Patric Stout c99f731f89 Update: documentation updates from 1.9 branch 5 years ago
Jonathan G Rennison a0c8bd2164 Version: Committing version data for tag: jgrpp-0.30.0 5 years ago
Jonathan G Rennison 5de3d907a0 version_utils.sh: Allow .ottdrev-vc to be dirty at release time 5 years ago
Jonathan G Rennison 44c8696b2a Fix Win32 compilation with WITH_DBGHELP on non-MSVC 5 years ago
Jonathan G Rennison a404db80f6 Merge branch 'master' into jgrpp
# Conflicts:
#	src/town_cmd.cpp
5 years ago