1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 13:33:02 +01:00
Commit Graph

97 Commits

Author SHA1 Message Date
ζeh Matt
1f03bc89d7 Remove unused String::Duplicate 2023-02-19 23:59:15 +02:00
ζeh Matt
a0bc5d9f3f Remove unused functions 2023-02-19 23:59:15 +02:00
Hielke Morsink
0762fcb601 Rename snake_case functions in OpenRCT2/util folder 2023-01-18 22:44:13 +01:00
Hielke Morsink
6b7dc8fcdb Rename snake_case functions in openrct2/src folder
Co-authored-by: duncanspumpkin <duncans_pumpkin@hotmail.co.uk>
2023-01-17 13:24:51 +01:00
Michael Steenbeek
b4480b344e Rename snake_case functions from localisation folder 2023-01-16 23:12:35 +00:00
James103
73738bbdc8 Replace 2022 with 2023 in copyright headers
Replace all instances of the year 2022 with 2023 in all copyright headers
2023-01-01 11:58:01 +01:00
73
b9e677945d Replace 20XX with 2022 (#18158)
* Replace 2020 with 2022

Replace all 2020 headers with 2022

* replace other years with 2022

add missing years
2022-10-01 08:42:14 +01:00
Ted John
142b9ff243 Optimise object selection search
* Do case insensitive string matching for object search.
* Return as soon as first field is a hit.
2022-07-30 16:50:54 +02:00
Hielke Morsink
323fad7b49 Allocate buffer on the stack and improve comments 2022-07-24 20:02:46 +02:00
jazzysoggy
c0853b56ad Fix Format_VA. Rename Format to StdFormat.
author jazzysoggy <39224097+jazzysoggy@users.noreply.github.com> 1655955994 -0400
committer jazzysoggy <39224097+jazzysoggy@users.noreply.github.com> 1656516326 -0400

Fixed Format_VA and renamed Format to StdFormat. Both now output to Std::String, while taking the same input as before. Changed functions that use these two to account for this output difference
2022-07-24 19:30:57 +02:00
Silent
dc7e31f7af Remove any traces of WinNT5.1 as per #16911 2022-06-20 21:26:40 +02:00
Michael Steenbeek
db900b12db Create enum for codepages (#17181) 2022-05-10 12:55:39 +02:00
Gymnasiast
6fcfd481ab Rename String::Convert() to String::ConvertToUtf8() 2022-05-01 18:09:44 +02:00
Silent
5e725913f8 Close #16566: Favour WinNT preprocessor version checks over MinGW (#16677) 2022-03-11 07:59:09 -03:00
Hielke Morsink
76b5479bbb Fix undefined use of cctype functions 2021-11-06 16:27:54 +01:00
Hielke Morsink
4b4b3333d6 Remove unnecessary else blocks 2021-09-16 18:31:12 +02:00
ζeh Matt
59a6c34db4 Make use of std::optional strict 2021-09-13 20:02:32 +03:00
Hielke Morsink
b2dfeaf1b9 Introduce String::URLEncode 2021-09-05 15:25:44 +02:00
Duncanspumpkin
0957542503 Implement C++ solution to truncate UTF8 strings 2021-03-18 22:14:12 +01:00
Ted John
2b197d0fb2 Fix parsing of shortcuts 2021-02-21 03:14:18 +00:00
Ted John
e5f263a0fc Get new manager showing in window 2021-02-21 03:13:27 +00:00
skdltmxn
c093a50f3f Refactor to use string_view more properly 2021-01-07 01:52:10 +09:00
Ted John
17edaae02b Improve banner formatting fix 2020-11-29 01:19:51 +00:00
Ted John
699103fe86 Fix banner text formatting, import / export 2020-11-28 16:52:19 +00:00
Ted John
dfcd8a4bbc Apply code review comments 2020-11-27 18:54:57 +00:00
Ted John
b6a688e540 Refactor format tokens 2020-11-27 18:54:57 +00:00
Ted John
c6152efa4e Fix scrolling text 2020-11-27 18:54:56 +00:00
Ted John
14377be487 Create new templated format string 2020-11-27 18:54:55 +00:00
Michael Steenbeek
8b27f7cdf8 Implement ToUpper for WinNT 5.1 (#13422) 2020-11-16 08:12:28 -03:00
Hielke Morsink
f0c1ea1d37 Split declarations and definitions to improve compile times when editing (#13332)
* Split FileStream declarations and definitions

* Split JobPool declarations and definitions

* Split StringBuilder declarations and definitions

* Split StringReader declarations and definitions

* Split ZoomLevel declarations and definitions

* Fix missing include in FileClassifier.cpp

* Remove pragma once from source files

* Fix missing include in StringBuilder.h

* Update Xcode project

* Fix compilation of tests

Co-authored-by: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-11-07 12:42:04 +00:00
Tulio Leao
9d2a9d76d3 Cleanup c-style casts from String.cpp 2020-09-10 21:36:21 +02:00
Matt
30376085cf Include missing headers 2020-08-05 16:29:29 +02:00
Aaron van Geffen
7b5087f057 Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Michael Steenbeek
9ef8d6da42 Convert most remaining C-style casts to C++-style ones (#11867) 2020-06-07 23:18:11 +02:00
Michael Steenbeek
f0bd05cf6d Part of #11158: Remove more C-style casts (#11743) 2020-05-13 21:22:50 -03:00
Michał Janiszewski
2323cc1596 Use named casts instead of old-style casts
Change prepared with clang-tidy and google-readability-casting check
2020-04-22 17:09:29 +02:00
Michał Janiszewski
92e5958ab6 Improve WinNT 5.1/MinGW support (#10869) 2020-03-05 19:35:23 +01:00
Michał Janiszewski
afc92ee15a ifdef-out WinNT 6.0+ APIs (#10198)
Occasionally I need to build a binary compatible with WinNT 5.1, e.g.
when testing out Wine or ReactOS. There are just a few minor changes
required to have a working build, but as they are not part of the
repository, I always end up doing them from scratch. I would like to
upstream them instead so I don't have to recreate them each time, even
if this is not the most common use case.
2019-11-08 23:16:15 +01:00
Ted John
a1d9e52046 Rename ToUtf16 to ToWideChar
This is more correct as wchar_t size can differ, for example Linux typically uses 32 bits for wchar_t where as Windows uses 16 bits.
2019-07-22 23:44:03 +01:00
hokasha2016
6022521118 Fix #7871: String::StartsWith() returns true if source is shorter than match 2019-04-20 18:55:27 +02:00
Aaron van Geffen
2af13904c5 Update copyright notices for 2019. (#8903) 2019-03-17 07:16:15 +00:00
ζeh Matt
7d19a5bc77 Refactor memcpy to std::memcpy and memset to std::memset (#8408) 2018-12-15 22:23:31 +01:00
Michael Steenbeek
13c326eb50 Fix part of #7415: Korean scenario descriptions are mangled
OpenRCT2 used to incorrectly write UTF-8 to SV6 names and descriptions. This fixes reading such scenarios. It should also fix the game crashing when attempting to load such a scenario.

What this doesn't do is add support for the encoding that vanilla used for CJK, or add support for creating scenarios with Korean descriptions. That will only be feasible when switching to our own format.
2018-08-13 15:53:44 +02:00
Linus Unnebäck
fd07be587a Remove Math::Clamp in favour of std::clamp 2018-08-12 16:47:12 +01:00
clang-format
d787872cbe Indent preprocessor directives 2018-07-23 16:00:23 +02:00
clang-format
b02dfdbc93 Binpack function arguments together
Previously when the arguments of a function wouldn't fit on a single line, clang-format would put each argument on its own line instead. By enabling the binpack parameter setting, it tried to fit as many on one line as possible instead.

Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
2018-07-23 16:00:22 +02:00
clang-format
3a4a11f738 clang-format core 2018-07-23 16:00:03 +02:00
Ted John
f728a5074a Fix #7765: Crash when opening ride list window on Windows Vista (#7781)
It has been reported that Windows Vista crashes in LCMapStringEx when
using LOCALE_NAME_INVARIANT even though it is documented as supported.

As a counter measure, use LOCALE_NAME_USER_DEFAULT for the time being.
2018-07-14 08:52:12 +01:00
Michael Steenbeek
1b08fb4e69 Replace our own integer types with standard ones 2018-06-20 17:30:40 +02:00
Michael Steenbeek
ec3a1e575e Replace Math::Min and Max with std variants 2018-06-20 17:11:35 +02:00