Commit Graph

645 Commits

Author SHA1 Message Date
Rubidium bcda4a72ee Codechange: make WindowClass a scoped enum 2026-05-20 21:39:04 +02:00
Peter Nelson 1e17c62f3a Codechange: make FindGRFConfigMode a scoped enum (#15461) 2026-04-11 20:10:45 +01:00
Peter Nelson 5aae8e2d64 Codechange: make Subdirectory a scoped enum 2026-04-05 21:46:07 +01:00
Peter Nelson 0b29a2560a Codechange: make GRFStatus, GRFListCompatibility and GRFParameterType scoped enums (#15426) 2026-04-05 16:41:56 +01:00
Peter Nelson 37118b93c7 Codechange: use scoped enum for ScriptSettingSource (#15377) 2026-03-08 14:00:23 +00:00
Rubidium 281d70c185 Codechange: use a scoped enum for ServerGameType 2026-03-03 18:53:37 +01:00
Rubidium 6370859c7e Codechange: add missing documentation to destructors 2026-02-24 16:24:53 +01:00
Rubidium 89ffb429c5 Codechange: document missing parameters and return values 2026-02-20 19:00:15 +01:00
Rubidium c6c06e13eb Codefix: wrong parameter names and partially missing parameters 2026-02-02 16:31:46 +01:00
Rubidium 4adf494ebc Codechange: enum-class-ify Commands 2026-01-28 23:32:51 +01:00
Tyler Trahan 18f2f7eb2d Codechange: Use enum class for setting values (#15074) 2026-01-10 22:40:48 +00:00
Rito12 859b56a066 Doc: Correct file descriptions to match coding style and doxygen. 2025-12-15 17:31:00 +01:00
Cyprian Klimaszewski 99f04f27de Doc: Update information for receiving a copy of GPL. (#14869) 2025-12-07 11:25:08 +00:00
Peter Nelson 06b830dc07 Codechange: Prefer string equality instead of comparison. (#14727) 2025-10-24 21:30:03 +02:00
Peter Nelson b042e7a439 Codefix: Prefer static inline const keyword order. (#14301) 2025-05-25 20:32:56 +01:00
Peter Nelson c2d4098afa Add: Configuration of NewGRF badges. 2025-05-25 09:13:05 +01:00
Rubidium 7981fcb297 Codechange: use std::fill_n over memset 2025-05-09 17:20:41 +02:00
frosch 61cec33be2 Codechange: Add 'const' to static variables, which are only initialised once. 2025-05-06 18:29:41 +02:00
Rubidium f2a32c6d13 Codechange: use std::byte instead of char for calculating arbitrary byte offsets 2025-05-02 23:12:43 +02:00
Rubidium 5ca686261e Codechange: use std::string_view for the string setting defaults 2025-05-01 23:24:43 +02:00
Rubidium 5c7b04a0c2 Codechange: use std::string_view for 'x-of-many' settings 2025-05-01 23:24:43 +02:00
frosch 316279f4b4 Codechange: Use more std::string_view. 2025-04-30 19:33:56 +02:00
frosch 36ce1f890a Codechange: Remove c_str, if std::string_view is already accepted. 2025-04-30 19:33:56 +02:00
frosch afe3dfb3a4 Codechange: Use format instead of to_string. 2025-04-29 20:26:23 +02:00
frosch 98481ecc01 Codechange: Replace strtol, strtoll, stroul and strtoull with ParseInteger. 2025-04-29 20:14:56 +02:00
frosch 79b2202f2e Codechange: Use StringConsumer for parsing more strings. 2025-04-29 20:14:56 +02:00
Rubidium af25eecc15 Codechange: use const for std::string_view where appropriate 2025-04-29 10:15:18 +02:00
Rubidium d1a7d30572 Codechange: use std::string_view for some settings functions 2025-04-26 16:30:16 +02:00
Rubidium 917ef03e97 Codechange: use std::string_view in IConsole settings API 2025-04-22 19:52:37 +02:00
Rubidium b279bc37e7 Codechange: use std::string_view to set string settings 2025-04-22 19:52:37 +02:00
Rubidium fdb8defa64 Codechange: use std::string_view to parse setting values 2025-04-22 19:52:37 +02:00
Loïc Guilloux 305c892b3a Change: "setting" console command now shows default value (#14061) 2025-04-21 16:00:37 +02:00
frosch 50252cb5df Codechange: Ini(Load|Save)WindowSettings expect a WindowDesc*, no void*. (#14029) 2025-04-18 18:44:58 +02:00
Peter Nelson 5b9d171e63 Codechange: Use EnumBitSet for StringValidationSettings. (#13974) 2025-04-08 21:19:17 +01:00
frosch 2cdf2bedfa Codechange: Add a std::string overload for StrMakeValidInPlace() and a moving std::string&& overload for StrMakeValid(). (#13962) 2025-04-07 18:22:47 +02:00
Peter Nelson 6914d99778 Codechange: Split baseset type definitions into separate files. 2025-03-27 18:57:53 +00:00
Peter Nelson 422ff9dbd8 Codechange: Use std::unique_ptr for ai/game config. 2025-03-26 10:54:11 +00:00
Peter Nelson 8b4114d709 Fix #13849: Settings in old saves could be overridden by defaults. (#13874)
Resolved by resetting settings to default values before the OPTS and PATS chunks are loaded.
2025-03-23 15:55:55 +00:00
Rubidium a23dda7ffe Codechange: use const auto & instead of making a copy 2025-03-08 21:33:17 +01:00
Rubidium fd4adc55e3 Codechange: replace INVALID_X with XID::Invalid() for PoolIDs 2025-02-16 20:23:00 +01:00
Rubidium 1ffc950e22 Codechange: use prefix operator++ for CompanyID iterations 2025-02-16 14:02:18 +01:00
Peter Nelson 2d7d085e8e Codechange: Use EncodedString for error messages. (#13569) 2025-02-16 10:04:32 +00:00
Rubidium c3d5e6d2a0 Codechange: Use EnumBitSet for DoCommandFlags 2025-02-14 00:28:57 +01:00
Peter Nelson d9bb002cac Codechange: Use local parameters for formatting settings values. (#13487) 2025-02-07 20:18:03 +00:00
Peter Nelson 6f52a977a8 Codechange: Use EnumBitSet for GRFConfigFlags.
This is renamed from `GCF_Flag` didn't match convention.
2025-02-02 10:49:45 +00:00
Peter Nelson c4c5028862 Codechange: Use EnumBitSet for SettingFlags. (#13429) 2025-02-01 15:46:51 +00:00
Peter Nelson 5664b1e2f6 Codechange: Use std::vector for GRFConfig lists. (#10835)
This replaces the C-style custom managed linked-list and allows use of iterators etc.
2025-01-31 17:09:09 +00:00
Rubidium 4099acb946 Codechange: replace BSWAP32/BSWAP16 with std::byteswap 2025-01-28 19:22:12 +01:00
Peter Nelson 9b947a37b8 Codechange: Pass GRFConfig by reference where feasible. (#13388)
In places where a GRFConfig is passed by pointer and not checked for nullptr, use a reference instead.
2025-01-26 22:41:08 +00:00
Peter Nelson 3edf19a2c5 Add: Sandbox settings to Sandbox Options window. (#13268) 2025-01-14 21:22:19 +00:00