Commit Graph

157 Commits (jgrpp)

Author SHA1 Message Date
Jonathan G Rennison 18a42664fc Merge branch 'master' into jgrpp
Remove 'byte' typedef
2 weeks ago
Patric Stout a3cfd23cf9
Codechange: rename byte to uint8_t (#12308) 2 months ago
Patric Stout fd073a2810 Remove: replace custom span with std::span 4 months ago
Jonathan G Rennison 97e6f3062e Adding of _t to (u)int types, and WChar to char32_t
See: eaae0bb5e
4 months ago
Jonathan G Rennison 7f6b1d6b94 Merge branch 'master' into jgrpp
# Conflicts:
#	src/company_cmd.cpp
#	src/company_func.h
#	src/core/overflowsafe_type.hpp
#	src/engine.cpp
#	src/music/midifile.cpp
#	src/network/network_command.cpp
#	src/newgrf_debug_gui.cpp
#	src/newgrf_roadstop.h
#	src/newgrf_spritegroup.cpp
#	src/os/macosx/crashlog_osx.cpp
#	src/os/unix/crashlog_unix.cpp
#	src/pathfinder/yapf/yapf_common.hpp
#	src/road_gui.cpp
#	src/saveload/engine_sl.cpp
#	src/script/api/script_depotlist.cpp
#	src/script/api/script_roadtypelist.cpp
#	src/settings_gui.cpp
#	src/settings_type.h
#	src/strings.cpp
#	src/table/settings/game_settings.ini
5 months ago
Rubidium e3f49ee7a0 Codechange: coding style fixes 5 months ago
Jonathan G Rennison 2a31095118 Merge branch 'master' into jgrpp
# Conflicts:
#	regression/regression/result.txt
#	src/aircraft_cmd.cpp
#	src/airport_gui.cpp
#	src/articulated_vehicles.cpp
#	src/console_cmds.cpp
#	src/date_gui.cpp
#	src/engine.cpp
#	src/genworld_gui.cpp
#	src/gfx_layout_fallback.cpp
#	src/group_gui.cpp
#	src/hotkeys.cpp
#	src/network/core/tcp_connect.cpp
#	src/network/core/tcp_listen.h
#	src/newgrf.cpp
#	src/newgrf.h
#	src/newgrf_engine.cpp
#	src/newgrf_gui.cpp
#	src/newgrf_station.cpp
#	src/openttd.cpp
#	src/order_gui.cpp
#	src/os/macosx/osx_main.cpp
#	src/pathfinder/yapf/yapf_node_rail.hpp
#	src/rail_gui.cpp
#	src/saveload/afterload.cpp
#	src/saveload/cargopacket_sl.cpp
#	src/saveload/linkgraph_sl.cpp
#	src/saveload/station_sl.cpp
#	src/script/api/script_industrytype.cpp
#	src/settings.cpp
#	src/settings_gui.cpp
#	src/settings_table.cpp
#	src/settingsgen/settingsgen.cpp
#	src/station.cpp
#	src/station_cmd.cpp
#	src/strings.cpp
#	src/timer/timer_game_calendar.cpp
#	src/timer/timer_game_calendar.h
#	src/timer/timer_manager.h
#	src/timer/timer_window.cpp
#	src/timetable_cmd.cpp
#	src/toolbar_gui.cpp
#	src/town_cmd.cpp
#	src/town_gui.cpp
#	src/train_gui.cpp
#	src/vehicle_cmd.h
#	src/vehicle_gui.cpp
#	src/viewport.cpp
#	src/widgets/dropdown.cpp
#	src/window_func.h
#	src/window_gui.h
6 months ago
Peter Nelson d4008850e3 Codechange: Ensure function opening `{` is on new line. 6 months ago
Peter Nelson ab535c0a86
Codechange: Add base() method to StrongType to allow access to the base type without casting. (#11445)
This removes the ability to explicitly cast to the base type, but the requirement
to use .base() means the conversion is still explicit.
7 months ago
Rubidium f16399f4c9 Codechange: replace x.size() > 0 with !x.empty() 7 months ago
Patric Stout 07730584d7
Codechange: make explicit when a TileIndex is cast to its basetype (#11190)
This prevents people accidentially assigning a TileIndex to a Date
or any other type they shouldn't.
9 months ago
Patric Stout 299570b2c1
Codechange: make TimerGameCalendar Date and Year types strongly typed (#10761) 9 months ago
Patric Stout 5fba47b0f7
Codechange: make no assumptions on how the internals of TileIndex work (#11183)
Basically, avoid ".value", and just cast it to its original type
if you want to retrieve this.
9 months ago
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
10 months ago
Rubidium 84037d4a57 Codechange: use std::string for parameters in the dbg_helpers 12 months ago
Jonathan G Rennison b381a30d2d Merge branch 'master' into jgrpp
# Conflicts:
#	src/base_media_func.h
#	src/cargopacket.h
#	src/gfxinit.cpp
#	src/industry_cmd.cpp
#	src/window_gui.h
1 year ago
Peter Nelson 56085be9bd Codechange: Move includes for common STL headers to stdafx. 1 year ago
Rubidium 68ff3fd062 Change: include fmt.h C++ headers in stdafx.h
This to prevent compilation issues between runs with and without precompiled
headers. Also remove the headers from the rest of the code base as they are
not needed there anymore, although they do relatively little harm.
1 year ago
Peter Nelson 9f26e74e1e Codechange: Rename item_t to Item. 1 year ago
Jonathan G Rennison ff0e779680 Merge branch 'master' into jgrpp
# Conflicts:
#	src/lang/czech.txt
#	src/order_backup.h
#	src/settings_internal.h
#	src/string.cpp
#	src/viewport.cpp
1 year ago
Rubidium 71b46db8d0 Cleanup: remove commented out code 1 year ago
Jonathan G Rennison 6459e62fff Merge branch 'master' into jgrpp
# Conflicts:
#	src/lang/english.txt
#	src/map_type.h
#	src/network/network_command.cpp
#	src/object_cmd.cpp
#	src/rail_cmd.cpp
#	src/road_cmd.cpp
#	src/road_func.h
#	src/saveload/afterload.cpp
#	src/saveload/saveload.h
#	src/settings_gui.cpp
#	src/string.cpp
#	src/table/road_land.h
#	src/table/settings/game_settings.ini
#	src/table/settings/world_settings.ini
#	src/tbtr_template_gui_main.h
#	src/train_cmd.cpp
2 years ago
PeterN 4031894aef
Cleanup: Remove svn-style `$Id$` comments. (#10122) 2 years ago
Michael Lutz 13528bfcd0 Codechange: Un-bitstuff all remaining commands. 2 years ago
Michael Lutz a05fd7aa50 Change: [Network] Transfer command data as serialized byte stream without fixed structure.
The data will be transmitted as the length followed by the serialized data. This allows the command
data to be different for every command type in the future.
2 years ago
Patric Stout 28e90769f7 Codechange: use "[[maybe_unused]]" instead of a wide variety of other ways we had
While at it, replace OTTD_ASSERT with WITH_ASSERT, as this
is always set if assert() is valid. No matter if NDEBUG is set
or not.
3 years ago
rubidium42 9197de39e4 Cleanup: remove unused copy-constructor without copy-assignment 3 years ago
Charles Pigott e8a94dc8bb Cleanup: Delete remaining Blob code 3 years ago
Charles Pigott f481c9fc2c Codechange: Replace CStrA with std::string 3 years ago
Patric Stout fece1c57ca
Codechange: Suppress warnings when asserts are disabled (#8917) 3 years ago
Michael Lutz 1e1a9f3999 Add: A simple, templated cache map that uses a least recently used eviction strategy. 3 years ago
Charles Pigott 9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 3 years ago
Charles Pigott 860c270c73 Codechange: Replace assert_compile macro with static_assert 3 years ago
TechGeekNZ 716c883737 Fix: Globally apply preprocessor directive coding style
Global; except for the 32-bit SSE blitter, which has some #DEFINEs
in not-very-nice places.
4 years ago
Charles Pigott 64b1c70fdd Codechange: Add WARN_FORMAT to vseprintf and fix the cascade of warnings that followed 4 years ago
Patric Stout 56d54cf60e Add: introduce CMake for project management
CMake works on all our supported platforms, like MSVC, Mingw, GCC,
Clang, and many more. It allows for a single way of doing things,
so no longer we need shell scripts and vbs scripts to work on all
our supported platforms.

Additionally, CMake allows to generate project files for like MSVC,
KDevelop, etc.

This heavily reduces the lines of code we need to support multiple
platforms from a project perspective.

Addtiionally, this heavily improves our detection of libraries, etc.
4 years ago
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 5 years ago
JMcKiern 04f659e768 Fix: Some typos found using codespell 5 years ago
Henry Wilson 7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 5 years ago
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 6 years ago
PeterN 8a7de36463
Change [#6689]: Tweak HashTable hash calculation to reduce collisions. (kernigh2) (#6786) 6 years ago
frosch e5d105900d (svn r27379) -Codechange: Do not throw in the destructors of ScriptTest/ExecMode. 9 years ago
alberth 1105b4d2c9 (svn r27363) -Codechange: Fix codestyle of one-line methods and header codestyle of derived structs. 9 years ago
alberth b885d79f50 (svn r27362) -Codechange: Codestyle fixes for reference var declarations, static cast type, operator methods. 9 years ago
rubidium e61fe21237 (svn r26506) -Codechange: replace most of vsnprintf with vseprintf 10 years ago
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 10 years ago
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 12 years ago
truebrain 1c9bec1999 (svn r23640) -Fix: stop using FORCEINLINE (1/3rd of the instances were, the others were still regular inline), but make sure inline is always a 'forced' inline (I am looking at you MSVC) 13 years ago
michi_cc f227e90c24 (svn r22875) -Codechange: Add some asserts and checks to better prevent overflow of the argument to malloc. (monoid) 13 years ago
rubidium fb5ecb9499 (svn r22411) -Document: another bunch of bits 13 years ago