1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 17:24:47 +01:00
Commit Graph

354 Commits

Author SHA1 Message Date
Michael Steenbeek
1982e8491b Merge pull request #12667 from mwnciau/json-refactor
Migrate JSON library to JSON for Modern C++
2020-09-17 21:11:06 +02:00
Simon Jarrett
324e94e6ce Fix #9088: refactor JSON code to use a more modern C++ library
- Removed dependency on jansson
- Implemented nlohmann JSON for Modern C++
- Moved generic GetString, etc., helper functions out of ObjectJsonHelpers.hpp to Json.hpp
- Added GetEnum helper function
- Added AsObject and AsArray helper functions
- Removed GetStringArray, etc., helper functions as they're not needed with the better language features
- Added second GetFlags definition that allows specifying inverted flags - this is a bit cleaner than previous hacks
- Comments!
2020-09-16 20:18:52 +01:00
Matt
3eff713765 Remove unused Registration.hpp 2020-09-16 20:23:39 +03:00
Tulio Leao
55f2eeb04d Favour constexpr function over macro on Crypt.CNG.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao
fc59cb55a5 Cleanup c-style casts from Path.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao
9d2a9d76d3 Cleanup c-style casts from String.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao
5f47546392 Cleanup c-style casts from Http.WinHttp.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao
5afe6407a1 Cleanup c-style casts from FileWatcher.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao
5abbbf1357 Cleanup c-style casts from Crypt.CNG.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao
cb7e190c8a Cleanup c-style casts from File.cpp 2020-09-10 21:36:21 +02:00
Tulio Leao
de58f0f7a0 Cleanup c-style casts from FileScanner.hpp 2020-09-10 21:36:21 +02:00
Gymnasiast
c83ddefe47 Convert remaining C-style casts to C++-style ones 2020-09-10 21:36:20 +02:00
Duncan
c0255efeaa Create an enum class serializer (#12810)
* Create an enum class serializer

* Make visitor work again

* Make suggested changes
2020-09-03 21:55:46 +01:00
Gabriel Guedes
95ae589750 Part of #11159: Prefer std::basic_string<utf8> over raw pointer
Usage of std::basic_string to improve readability and maintainability.
2020-08-31 21:06:02 -03:00
Gabriel Guedes
332e9e76d5 Part of #11159: Removing unused functions from StringBuilder.hpp 2020-08-29 14:34:30 -03:00
ζeh Matt
e464c9e522 Invert the condition (#12645) 2020-08-11 19:29:18 +01:00
Matt
2a9796f2cc Add more guards in network code 2020-08-11 15:56:09 +02:00
ceeac
db010cd971 Fix compile error when compiling with clang-10 (#12599)
<cstddef> is required for size_t (used in CircularBuffer.h)
2020-08-06 16:24:50 +01:00
ζeh Matt
765eada18e Merge pull request #12526 from ZehMatt/win32-cleanup
Win32 and namespace cleanup
2020-08-05 17:18:50 +02:00
Matt
97d14feaa6 Rebase fixes 2020-08-05 16:35:40 +02:00
Matt
0dc43d66e4 Remove the use of INTERFACE macro and macro its self 2020-08-05 16:30:44 +02:00
Matt
83355e35cc Move IStream, MemoryStream, FileStream into OpenRCT2 namespace 2020-08-05 16:29:36 +02:00
Matt
30376085cf Include missing headers 2020-08-05 16:29:29 +02:00
Matt
05a9b27136 Fix ByteSwapBE type safety 2020-08-05 16:17:18 +02:00
Sidney
7c0b03463c Close #12452: Refactor DIAGNOSTIC_LEVEL to use strong enum (#12549) 2020-08-02 07:51:02 +01:00
Aaron van Geffen
7b5087f057 Update copyright year to 2020 2020-07-21 15:04:34 +02:00
Ted John
cca43eb9e1 Fix mingw build 2020-07-11 11:45:50 +01:00
Tulio Leao
f725fff2da Clarify CoordsRange-derived interface methods (#12127) 2020-07-06 14:42:11 +02:00
frutiemax
26ae2dbf04 Part of #11437: Move PlatformFileExists to Platform2.h (#12077) 2020-07-02 12:03:31 -03:00
Tulio Leao
03ba7e5301 Merge pull request #11933 from AaronVanGeffen/unused-vars
Patch unused variables
2020-06-11 12:12:06 -03:00
Aaron van Geffen
3090e2af79 Fix compilation failure due to unused vars.
Compilation fails due to warnings-turned-errors.
2020-06-11 15:22:06 +02:00
Michael Steenbeek
9ef8d6da42 Convert most remaining C-style casts to C++-style ones (#11867) 2020-06-07 23:18:11 +02:00
Ted John
8f77125cdb Fix #11298: Unable to advertise server (500): Retry with ipv4 only (#11824)
Add new config option to allow any address to be advertised. This then
doesn't rely on the master server retrieving the server IP address via
the HTTP request which can often be IPv6 by default.
2020-05-30 18:21:22 +02:00
Ted John
46bb30f8a1 Refactor rct_palette to GamePalette 2020-05-27 20:52:51 +01:00
Gymnasiast
de69bbd661 Guard against illegal access 2020-05-19 21:25:27 +02:00
Gymnasiast
4b25345d8d Create GamePalette struct 2020-05-19 21:09:51 +02:00
Michael Steenbeek
f0bd05cf6d Part of #11158: Remove more C-style casts (#11743) 2020-05-13 21:22:50 -03:00
Michael Steenbeek
d7637cd70f Replace many C-style casts (#11720) 2020-05-11 14:32:56 +02:00
Michael Steenbeek
a261b4ce33 Remove commented out code (#11721) 2020-05-11 13:54:15 +02:00
Ted John
45d32bec68 [Plugin] Add API for taking captures and giant captures of the park 2020-05-09 13:55:24 +02:00
Ted John
51ed760409 Fix FileWatcher header file 2020-04-26 14:35:09 +01:00
Ted John
127dd1543e Disable FileWatcher for macOS 2020-04-26 14:35:08 +01:00
Ted John
2f525e0539 Apply more code review comments 2020-04-26 14:35:07 +01:00
Ted John
d480fb8daa Apply suggestions from code review
Co-Authored-By: Tulio Leao <tupaschoal@gmail.com>
Co-Authored-By: Michael Steenbeek <m.o.steenbeek@gmail.com>
2020-04-26 14:35:07 +01:00
Ted John
62d15e44db Fix mingw build 2020-04-26 14:35:07 +01:00
Ted John
e6341f0a42 Get scripting compiling on clang 2020-04-26 14:35:03 +01:00
Ted John
4109b2c55a Fix build errors 2020-04-26 14:35:01 +01:00
Hielke Morsink
e8bdb95f13 format new files
Since many of the changes were made before the clang-format changes went live, the new source files used a different format still. This PR applies the new style to all the new source files.
2020-04-26 14:35:00 +01:00
Hielke Morsink
c064614280 Use new copyright/license notice 2020-04-26 14:35:00 +01:00
Ted John
5ba96a34ac Fix FileWatcher for Windows 2020-04-26 14:35:00 +01:00