1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-16 00:42:45 +01:00
Commit Graph

1891 Commits

Author SHA1 Message Date
Peter Nelson
7846f0f4ee Fix a4dc7249ee: Changing language or interface scale could hang. (#14087)
A bit of hysteresis caused by OnResize calling ReInit calling OnResize calling ReInit calling OnResize calling ReInit ...
2025-04-24 00:29:54 +01:00
frosch
2a62eea005 Codefix: Comment style. (#14064) 2025-04-21 17:25:09 +02:00
Peter Nelson
0cf7048a67 Change: Don't select content when toggling its download status. (#14059)
This improves usability when toggling content sorted by status, as the list position no longer jumps to the now (de)selected item, making it easier to (de)select multiple items.
2025-04-21 13:20:52 +01:00
Rubidium
4e14f0ac3f Codechange: pass network tokens as std::string_view or with move semantics where appropriate 2025-04-20 22:43:24 +02:00
Rubidium
c13956a58a Codechange: use std::string_view for connection strings 2025-04-20 22:43:24 +02:00
Rubidium
31433882a4 Codechange: use std::string_view for passing NetworkError strings 2025-04-20 22:43:24 +02:00
frosch
cb113cfed0 Codefix: Add missing header includes. 2025-04-20 22:06:18 +02:00
Rubidium
26de3404a4 Codechange: use std::string_view for sending chat messages 2025-04-20 13:31:41 +02:00
Rubidium
bb259b8e77 Codechange: use std::string_view for sending a remote console command (result) 2025-04-20 13:31:41 +02:00
Rubidium
d99edf2bbc Codechange: use std::string_view for kicking/banning 2025-04-20 13:31:41 +02:00
Rubidium
a0246bc8a7 Codechange: use std::string_view over std::string for NetworkTextMessage 2025-04-20 13:31:41 +02:00
Rubidium
a0e4dab771 Codechange: use std::string_view for NetworkAddress::IsInNetmask of std::string 2025-04-20 13:31:41 +02:00
frosch
26db4ccf09 Codechange: Turn bit-stuffed FiosType enum into a struct. (#14019) 2025-04-18 15:20:55 +02:00
Peter Nelson
5008568dfc Codechange: Rename CenterBounds to CentreBounds and move to geometry header. (#14002) 2025-04-14 23:55:40 +01:00
Peter Nelson
1744156149 Change: Queue content ID information requests. (#13990)
Instead of requesting content one ID at a time, queue them up to be requested in one go.

* Avoids sending many small requests.
* Avoids sending requests for content which is likely to be arriving anyway.
2025-04-12 12:50:36 +01:00
Peter Nelson
3347919fb2 Codechange: Remove empty destructor and use member init for ClientNetworkContentSocketHandler. 2025-04-11 23:08:59 +01:00
Peter Nelson
20d83677eb Codechange: Use unique_ptr to manage ContentInfo lifetime.
Removes manually managed new/delete.
2025-04-11 23:08:59 +01:00
Peter Nelson
7b31f26611 Codechange: Pass ContentInfo by reference.
Many functions take a ContentInfo pointer, but do not check for nullptr.
Pass by reference instead to assure it is present.
2025-04-11 23:08:59 +01:00
Peter Nelson
413087df9d Codechange: Use small function to get check handler for content type. (#13988)
This reduces a long switch block with (multiple) breaks with the power of early return.
2025-04-10 20:45:43 +00:00
Peter Nelson
936d78fefc Codefix: Avoid uppercase characters in variable names. (#13985) 2025-04-10 07:19:27 +01:00
frosch
fa284af263 Codechange: Replace remaining Utf8Encode usages with StringBuilder. 2025-04-08 23:10:58 +02:00
frosch
04246c530f Codechange: Use fmt::format instead of stringstream with iomanip flags. (#13964) 2025-04-08 20:57:50 +00: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
9feaa6b7bc Codechange: Use vector/unique_ptr to manage network game information. (#13902)
Replaces linked list with manual memory management.
2025-03-27 18:48:41 +00:00
Peter Nelson
2909a14374 Codechange: Include table/strings.h in files that use StringIDs.
Be consistent with how and where the file is incldued.
2025-03-21 12:53:40 +00:00
Rubidium
ec647975ad Cleanup: remove ancient FIXME comments 2025-03-16 05:42:29 +01:00
Peter Nelson
3b004c57bc Codechange: Use EnumBitSet for AdminUpdateFrequency. (#13819) 2025-03-15 21:18:20 +00:00
Rubidium
754311a779 Codechange: use std::move when appropriate 2025-03-13 13:00:24 +01:00
Rubidium
0fde979b21 Codefix: check for errors in the function getting the socket error 2025-03-12 17:55:34 +01:00
Rubidium
486ad7d416 Codefix: check curl_easy_setopt executes properly, or show a debug message 2025-03-12 17:55:34 +01:00
Peter Nelson
3eb89f04b5 Codechange: Use EnumBitSet for QueryStringFlags. (#13792) 2025-03-10 18:59:35 +00:00
Rubidium
2000cea235 Codechange: initialise instance members 2025-03-09 20:41:03 +01:00
Rubidium
d07d75229b Codefix: data race in case of a spurious wake up 2025-03-09 19:34:47 +01:00
Peter Nelson
ab0d6e8b95 Codechange: Drop default widget strings for network windows. 2025-03-04 08:23:28 +00:00
Peter Nelson
4e485cd083 Fix: Network relay question used string parameters unconventionally. (#13734) 2025-03-04 00:25:15 +00:00
Peter Nelson
e9609e4558 Codechange: Use GetWidgetString for network windows. (#13699) 2025-03-02 18:51:54 +00:00
Peter Nelson
edf9f597ec Codechange: Use parameterised GetString() for remaining windows. 2025-03-02 07:29:25 +00:00
Rubidium
8886503ba9 Codechange: Use parameterised GetString for NetworkTextMessage 2025-03-01 12:42:55 +01:00
Rubidium
c540c2bcf7 Codechange: explicitly initialise member variables of Windows 2025-02-27 19:58:31 +01:00
Peter Nelson
2b80812922 Codechange: Use parameterised GetString() in network-related windows. (#13635) 2025-02-22 13:16:47 +00:00
Rubidium
d0ba6ed1f4 Codechange: explicitly initialise network pool item related member variables 2025-02-20 16:58:51 +01:00
Rubidium
fd4adc55e3 Codechange: replace INVALID_X with XID::Invalid() for PoolIDs 2025-02-16 20:23:00 +01:00
Rubidium
af00b835a1 Codechange: remove transitional supports from the pool 2025-02-16 19:31:37 +01:00
Rubidium
ab8177ea77 Codechange: strongly type CompanyID 2025-02-16 14:02:18 +01:00
Rubidium
5401ab1f7b Codechange: use ReferenceThroughBaseContainer for containers that are index by CompanyID 2025-02-16 14:02:18 +01:00
Rubidium
b0eb8fe4db Codechange: introduce ConvertibleThroughBase helpers 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
Peter Nelson
04708736d9 Codechange: Use EnumBitSet for CommandFlags. (#13560) 2025-02-15 09:36:20 +00:00