mirror of https://github.com/OpenRCT2/OpenRCT2.git
Reformat with clang-format-12 from updated CI image
This commit is contained in:
parent
0a31d9284b
commit
7b0e6ad0b6
|
@ -9,8 +9,9 @@
|
||||||
|
|
||||||
#if !defined(DISABLE_NETWORK) && defined(_WIN32) && (!defined(_WIN32_WINNT) || _WIN32_WINNT >= 0x0600)
|
#if !defined(DISABLE_NETWORK) && defined(_WIN32) && (!defined(_WIN32_WINNT) || _WIN32_WINNT >= 0x0600)
|
||||||
|
|
||||||
# include "../platform/Platform2.h"
|
|
||||||
# include "Crypt.h"
|
# include "Crypt.h"
|
||||||
|
|
||||||
|
# include "../platform/Platform2.h"
|
||||||
# include "IStream.hpp"
|
# include "IStream.hpp"
|
||||||
|
|
||||||
# include <sstream>
|
# include <sstream>
|
||||||
|
|
|
@ -9,9 +9,10 @@
|
||||||
|
|
||||||
#if !defined(DISABLE_HTTP) && (!defined(_WIN32) || (defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600))
|
#if !defined(DISABLE_HTTP) && (!defined(_WIN32) || (defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600))
|
||||||
|
|
||||||
|
# include "Http.h"
|
||||||
|
|
||||||
# include "../Version.h"
|
# include "../Version.h"
|
||||||
# include "../core/Console.hpp"
|
# include "../core/Console.hpp"
|
||||||
# include "Http.h"
|
|
||||||
|
|
||||||
# include <cstring>
|
# include <cstring>
|
||||||
# include <memory>
|
# include <memory>
|
||||||
|
|
|
@ -193,7 +193,7 @@ namespace OpenRCT2
|
||||||
Write(&value);
|
Write(&value);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>[[nodiscard]] std::unique_ptr<T[]> ReadArray(size_t count)
|
template<typename T> [[nodiscard]] std::unique_ptr<T[]> ReadArray(size_t count)
|
||||||
{
|
{
|
||||||
auto buffer = std::make_unique<T[]>(count);
|
auto buffer = std::make_unique<T[]>(count);
|
||||||
Read(buffer.get(), sizeof(T) * count);
|
Read(buffer.get(), sizeof(T) * count);
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#include "Drawing.h"
|
||||||
|
|
||||||
#include "../Context.h"
|
#include "../Context.h"
|
||||||
#include "../OpenRCT2.h"
|
#include "../OpenRCT2.h"
|
||||||
#include "../PlatformEnvironment.h"
|
#include "../PlatformEnvironment.h"
|
||||||
|
@ -17,7 +19,6 @@
|
||||||
#include "../sprites.h"
|
#include "../sprites.h"
|
||||||
#include "../ui/UiContext.h"
|
#include "../ui/UiContext.h"
|
||||||
#include "../util/Util.h"
|
#include "../util/Util.h"
|
||||||
#include "Drawing.h"
|
|
||||||
#include "ScrollingText.h"
|
#include "ScrollingText.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
|
@ -7,11 +7,12 @@
|
||||||
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#include "../drawing/Drawing.h"
|
||||||
|
|
||||||
#include "../Context.h"
|
#include "../Context.h"
|
||||||
#include "../common.h"
|
#include "../common.h"
|
||||||
#include "../config/Config.h"
|
#include "../config/Config.h"
|
||||||
#include "../core/String.hpp"
|
#include "../core/String.hpp"
|
||||||
#include "../drawing/Drawing.h"
|
|
||||||
#include "../drawing/IDrawingContext.h"
|
#include "../drawing/IDrawingContext.h"
|
||||||
#include "../drawing/IDrawingEngine.h"
|
#include "../drawing/IDrawingEngine.h"
|
||||||
#include "../interface/Viewport.h"
|
#include "../interface/Viewport.h"
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#include "../Paint.h"
|
||||||
|
|
||||||
#include "../../Game.h"
|
#include "../../Game.h"
|
||||||
#include "../../config/Config.h"
|
#include "../../config/Config.h"
|
||||||
#include "../../interface/Viewport.h"
|
#include "../../interface/Viewport.h"
|
||||||
|
@ -16,7 +18,6 @@
|
||||||
#include "../../world/Banner.h"
|
#include "../../world/Banner.h"
|
||||||
#include "../../world/Scenery.h"
|
#include "../../world/Scenery.h"
|
||||||
#include "../../world/TileInspector.h"
|
#include "../../world/TileInspector.h"
|
||||||
#include "../Paint.h"
|
|
||||||
#include "Paint.TileElement.h"
|
#include "Paint.TileElement.h"
|
||||||
|
|
||||||
// BannerBoundBoxes[rotation][0] is for the pole in the back
|
// BannerBoundBoxes[rotation][0] is for the pole in the back
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#include "../Paint.h"
|
||||||
|
|
||||||
#include "../../Context.h"
|
#include "../../Context.h"
|
||||||
#include "../../Game.h"
|
#include "../../Game.h"
|
||||||
#include "../../GameState.h"
|
#include "../../GameState.h"
|
||||||
|
@ -24,7 +26,6 @@
|
||||||
#include "../../world/Footpath.h"
|
#include "../../world/Footpath.h"
|
||||||
#include "../../world/Park.h"
|
#include "../../world/Park.h"
|
||||||
#include "../../world/TileInspector.h"
|
#include "../../world/TileInspector.h"
|
||||||
#include "../Paint.h"
|
|
||||||
#include "../Supports.h"
|
#include "../Supports.h"
|
||||||
#include "Paint.TileElement.h"
|
#include "Paint.TileElement.h"
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#include "../Paint.h"
|
||||||
|
|
||||||
#include "../../Game.h"
|
#include "../../Game.h"
|
||||||
#include "../../config/Config.h"
|
#include "../../config/Config.h"
|
||||||
#include "../../core/Numerics.hpp"
|
#include "../../core/Numerics.hpp"
|
||||||
|
@ -22,7 +24,6 @@
|
||||||
#include "../../world/Map.h"
|
#include "../../world/Map.h"
|
||||||
#include "../../world/Scenery.h"
|
#include "../../world/Scenery.h"
|
||||||
#include "../../world/TileInspector.h"
|
#include "../../world/TileInspector.h"
|
||||||
#include "../Paint.h"
|
|
||||||
#include "../Supports.h"
|
#include "../Supports.h"
|
||||||
#include "Paint.TileElement.h"
|
#include "Paint.TileElement.h"
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#include "../Paint.h"
|
||||||
|
|
||||||
#include "../../Context.h"
|
#include "../../Context.h"
|
||||||
#include "../../Game.h"
|
#include "../../Game.h"
|
||||||
#include "../../config/Config.h"
|
#include "../../config/Config.h"
|
||||||
|
@ -31,7 +33,6 @@
|
||||||
#include "../../world/Scenery.h"
|
#include "../../world/Scenery.h"
|
||||||
#include "../../world/Surface.h"
|
#include "../../world/Surface.h"
|
||||||
#include "../../world/TileInspector.h"
|
#include "../../world/TileInspector.h"
|
||||||
#include "../Paint.h"
|
|
||||||
#include "../Supports.h"
|
#include "../Supports.h"
|
||||||
#include "Paint.Surface.h"
|
#include "Paint.Surface.h"
|
||||||
#include "Paint.TileElement.h"
|
#include "Paint.TileElement.h"
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#include "../Paint.h"
|
||||||
|
|
||||||
#include "../../Game.h"
|
#include "../../Game.h"
|
||||||
#include "../../config/Config.h"
|
#include "../../config/Config.h"
|
||||||
#include "../../interface/Viewport.h"
|
#include "../../interface/Viewport.h"
|
||||||
|
@ -17,7 +19,6 @@
|
||||||
#include "../../world/Scenery.h"
|
#include "../../world/Scenery.h"
|
||||||
#include "../../world/SmallScenery.h"
|
#include "../../world/SmallScenery.h"
|
||||||
#include "../../world/TileInspector.h"
|
#include "../../world/TileInspector.h"
|
||||||
#include "../Paint.h"
|
|
||||||
#include "../Supports.h"
|
#include "../Supports.h"
|
||||||
#include "Paint.TileElement.h"
|
#include "Paint.TileElement.h"
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#include "../Paint.h"
|
||||||
|
|
||||||
#include "../../Game.h"
|
#include "../../Game.h"
|
||||||
#include "../../common.h"
|
#include "../../common.h"
|
||||||
#include "../../config/Config.h"
|
#include "../../config/Config.h"
|
||||||
|
@ -21,7 +23,6 @@
|
||||||
#include "../../world/Scenery.h"
|
#include "../../world/Scenery.h"
|
||||||
#include "../../world/TileInspector.h"
|
#include "../../world/TileInspector.h"
|
||||||
#include "../../world/Wall.h"
|
#include "../../world/Wall.h"
|
||||||
#include "../Paint.h"
|
|
||||||
#include "Paint.TileElement.h"
|
#include "Paint.TileElement.h"
|
||||||
|
|
||||||
static constexpr const uint8_t DirectionToDoorImageOffset0[] = {
|
static constexpr const uint8_t DirectionToDoorImageOffset0[] = {
|
||||||
|
|
|
@ -9,11 +9,12 @@
|
||||||
|
|
||||||
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__FreeBSD__)
|
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__FreeBSD__)
|
||||||
|
|
||||||
|
# include "platform.h"
|
||||||
|
|
||||||
# include "../core/Memory.hpp"
|
# include "../core/Memory.hpp"
|
||||||
# include "../core/Path.hpp"
|
# include "../core/Path.hpp"
|
||||||
# include "../core/String.hpp"
|
# include "../core/String.hpp"
|
||||||
# include "Platform2.h"
|
# include "Platform2.h"
|
||||||
# include "platform.h"
|
|
||||||
|
|
||||||
# include <clocale>
|
# include <clocale>
|
||||||
# include <cstdlib>
|
# include <cstdlib>
|
||||||
|
|
|
@ -74,13 +74,13 @@ uint8_t soft_light(uint8_t a, uint8_t b);
|
||||||
|
|
||||||
size_t strcatftime(char* buffer, size_t bufferSize, const char* format, const struct tm* tp);
|
size_t strcatftime(char* buffer, size_t bufferSize, const char* format, const struct tm* tp);
|
||||||
|
|
||||||
template<typename T>[[nodiscard]] constexpr uint64_t EnumToFlag(T v)
|
template<typename T> [[nodiscard]] constexpr uint64_t EnumToFlag(T v)
|
||||||
{
|
{
|
||||||
static_assert(std::is_enum_v<T>);
|
static_assert(std::is_enum_v<T>);
|
||||||
return 1ULL << static_cast<std::underlying_type_t<T>>(v);
|
return 1ULL << static_cast<std::underlying_type_t<T>>(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename... T>[[nodiscard]] constexpr uint64_t EnumsToFlags(T... types)
|
template<typename... T> [[nodiscard]] constexpr uint64_t EnumsToFlags(T... types)
|
||||||
{
|
{
|
||||||
return (EnumToFlag(types) | ...);
|
return (EnumToFlag(types) | ...);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue