Reformat with clang-format-12 from updated CI image

This commit is contained in:
Michał Janiszewski 2021-12-12 17:48:52 +01:00
parent 0a31d9284b
commit 7b0e6ad0b6
13 changed files with 25 additions and 14 deletions

View File

@ -9,8 +9,9 @@
#if !defined(DISABLE_NETWORK) && defined(_WIN32) && (!defined(_WIN32_WINNT) || _WIN32_WINNT >= 0x0600)
# include "../platform/Platform2.h"
# include "Crypt.h"
# include "../platform/Platform2.h"
# include "IStream.hpp"
# include <sstream>

View File

@ -9,9 +9,10 @@
#if !defined(DISABLE_HTTP) && (!defined(_WIN32) || (defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600))
# include "Http.h"
# include "../Version.h"
# include "../core/Console.hpp"
# include "Http.h"
# include <cstring>
# include <memory>

View File

@ -193,7 +193,7 @@ namespace OpenRCT2
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);
Read(buffer.get(), sizeof(T) * count);

View File

@ -7,6 +7,8 @@
* OpenRCT2 is licensed under the GNU General Public License version 3.
*****************************************************************************/
#include "Drawing.h"
#include "../Context.h"
#include "../OpenRCT2.h"
#include "../PlatformEnvironment.h"
@ -17,7 +19,6 @@
#include "../sprites.h"
#include "../ui/UiContext.h"
#include "../util/Util.h"
#include "Drawing.h"
#include "ScrollingText.h"
#include <algorithm>

View File

@ -7,11 +7,12 @@
* OpenRCT2 is licensed under the GNU General Public License version 3.
*****************************************************************************/
#include "../drawing/Drawing.h"
#include "../Context.h"
#include "../common.h"
#include "../config/Config.h"
#include "../core/String.hpp"
#include "../drawing/Drawing.h"
#include "../drawing/IDrawingContext.h"
#include "../drawing/IDrawingEngine.h"
#include "../interface/Viewport.h"

View File

@ -7,6 +7,8 @@
* OpenRCT2 is licensed under the GNU General Public License version 3.
*****************************************************************************/
#include "../Paint.h"
#include "../../Game.h"
#include "../../config/Config.h"
#include "../../interface/Viewport.h"
@ -16,7 +18,6 @@
#include "../../world/Banner.h"
#include "../../world/Scenery.h"
#include "../../world/TileInspector.h"
#include "../Paint.h"
#include "Paint.TileElement.h"
// BannerBoundBoxes[rotation][0] is for the pole in the back

View File

@ -7,6 +7,8 @@
* OpenRCT2 is licensed under the GNU General Public License version 3.
*****************************************************************************/
#include "../Paint.h"
#include "../../Context.h"
#include "../../Game.h"
#include "../../GameState.h"
@ -24,7 +26,6 @@
#include "../../world/Footpath.h"
#include "../../world/Park.h"
#include "../../world/TileInspector.h"
#include "../Paint.h"
#include "../Supports.h"
#include "Paint.TileElement.h"

View File

@ -7,6 +7,8 @@
* OpenRCT2 is licensed under the GNU General Public License version 3.
*****************************************************************************/
#include "../Paint.h"
#include "../../Game.h"
#include "../../config/Config.h"
#include "../../core/Numerics.hpp"
@ -22,7 +24,6 @@
#include "../../world/Map.h"
#include "../../world/Scenery.h"
#include "../../world/TileInspector.h"
#include "../Paint.h"
#include "../Supports.h"
#include "Paint.TileElement.h"

View File

@ -7,6 +7,8 @@
* OpenRCT2 is licensed under the GNU General Public License version 3.
*****************************************************************************/
#include "../Paint.h"
#include "../../Context.h"
#include "../../Game.h"
#include "../../config/Config.h"
@ -31,7 +33,6 @@
#include "../../world/Scenery.h"
#include "../../world/Surface.h"
#include "../../world/TileInspector.h"
#include "../Paint.h"
#include "../Supports.h"
#include "Paint.Surface.h"
#include "Paint.TileElement.h"

View File

@ -7,6 +7,8 @@
* OpenRCT2 is licensed under the GNU General Public License version 3.
*****************************************************************************/
#include "../Paint.h"
#include "../../Game.h"
#include "../../config/Config.h"
#include "../../interface/Viewport.h"
@ -17,7 +19,6 @@
#include "../../world/Scenery.h"
#include "../../world/SmallScenery.h"
#include "../../world/TileInspector.h"
#include "../Paint.h"
#include "../Supports.h"
#include "Paint.TileElement.h"

View File

@ -7,6 +7,8 @@
* OpenRCT2 is licensed under the GNU General Public License version 3.
*****************************************************************************/
#include "../Paint.h"
#include "../../Game.h"
#include "../../common.h"
#include "../../config/Config.h"
@ -21,7 +23,6 @@
#include "../../world/Scenery.h"
#include "../../world/TileInspector.h"
#include "../../world/Wall.h"
#include "../Paint.h"
#include "Paint.TileElement.h"
static constexpr const uint8_t DirectionToDoorImageOffset0[] = {

View File

@ -9,11 +9,12 @@
#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__FreeBSD__)
# include "platform.h"
# include "../core/Memory.hpp"
# include "../core/Path.hpp"
# include "../core/String.hpp"
# include "Platform2.h"
# include "platform.h"
# include <clocale>
# include <cstdlib>

View File

@ -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);
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>);
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) | ...);
}