diff options
| author | Stefan Boberg <[email protected]> | 2021-09-16 15:46:43 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-09-16 15:47:56 +0200 |
| commit | c3a7f98683d8c017f6a0dc3e884f2397670563e6 (patch) | |
| tree | 37bc2bc7255f913bd52fc9ed3103138e8c594bfc /zencore/include | |
| parent | Improved package serialization to allow round tripping (diff) | |
| download | zen-c3a7f98683d8c017f6a0dc3e884f2397670563e6.tar.xz zen-c3a7f98683d8c017f6a0dc3e884f2397670563e6.zip | |
clang-format fixes
Diffstat (limited to 'zencore/include')
| -rw-r--r-- | zencore/include/zencore/atomic.h | 4 | ||||
| -rw-r--r-- | zencore/include/zencore/except.h | 2 | ||||
| -rw-r--r-- | zencore/include/zencore/intmath.h | 2 | ||||
| -rw-r--r-- | zencore/include/zencore/iobuffer.h | 16 | ||||
| -rw-r--r-- | zencore/include/zencore/memory.h | 10 | ||||
| -rw-r--r-- | zencore/include/zencore/session.h | 4 | ||||
| -rw-r--r-- | zencore/include/zencore/zencore.h | 49 |
7 files changed, 44 insertions, 43 deletions
diff --git a/zencore/include/zencore/atomic.h b/zencore/include/zencore/atomic.h index 7e261771b..bf549e21d 100644 --- a/zencore/include/zencore/atomic.h +++ b/zencore/include/zencore/atomic.h @@ -5,9 +5,9 @@ #include <zencore/zencore.h> #if ZEN_COMPILER_MSC -#include <intrin.h> +# include <intrin.h> #else -#include <atomic> +# include <atomic> #endif #include <cinttypes> diff --git a/zencore/include/zencore/except.h b/zencore/include/zencore/except.h index 36cca895f..08330e4bc 100644 --- a/zencore/include/zencore/except.h +++ b/zencore/include/zencore/except.h @@ -51,7 +51,7 @@ private: }; ZENCORE_API void ThrowSystemException(HRESULT hRes, std::string_view Message); -#endif // ZEN_PLATFORM_WINDOWS +#endif // ZEN_PLATFORM_WINDOWS ZENCORE_API void ThrowLastError(std::string_view Message); diff --git a/zencore/include/zencore/intmath.h b/zencore/include/zencore/intmath.h index 814a03df4..b127c8993 100644 --- a/zencore/include/zencore/intmath.h +++ b/zencore/include/zencore/intmath.h @@ -179,6 +179,6 @@ Max(auto x, auto y) ////////////////////////////////////////////////////////////////////////// -void intmath_forcelink(); // internal +void intmath_forcelink(); // internal } // namespace zen diff --git a/zencore/include/zencore/iobuffer.h b/zencore/include/zencore/iobuffer.h index f8b8217d7..517cc7b69 100644 --- a/zencore/include/zencore/iobuffer.h +++ b/zencore/include/zencore/iobuffer.h @@ -13,14 +13,14 @@ struct IoBufferExtendedCore; enum class ZenContentType : uint8_t { - kBinary = 0, // Note that since this is zero, this will be the default value in IoBuffer - kText = 1, - kJSON = 2, - kCbObject = 3, - kCbPackage = 4, - kYAML = 5, - kCbPackageOffer = 6, - kCompressedBinary = 7, + kBinary = 0, // Note that since this is zero, this will be the default value in IoBuffer + kText = 1, + kJSON = 2, + kCbObject = 3, + kCbPackage = 4, + kYAML = 5, + kCbPackageOffer = 6, + kCompressedBinary = 7, kUnknownContentType = 8, kCOUNT }; diff --git a/zencore/include/zencore/memory.h b/zencore/include/zencore/memory.h index 9d6339595..3d4db1081 100644 --- a/zencore/include/zencore/memory.h +++ b/zencore/include/zencore/memory.h @@ -83,7 +83,7 @@ struct MutableMemoryView { } - inline bool IsEmpty() const { return m_Data == m_DataEnd; } + inline bool IsEmpty() const { return m_Data == m_DataEnd; } void* GetData() const { return m_Data; } void* GetDataEnd() const { return m_DataEnd; } size_t GetSize() const { return reinterpret_cast<uint8_t*>(m_DataEnd) - reinterpret_cast<uint8_t*>(m_Data); } @@ -194,10 +194,10 @@ struct MemoryView { } - inline bool Contains(const MemoryView& Other) const { return (m_Data <= Other.m_Data) && (m_DataEnd >= Other.m_DataEnd); } - inline bool IsEmpty() const { return m_Data == m_DataEnd; } - const void* GetData() const { return m_Data; } - const void* GetDataEnd() const { return m_DataEnd; } + inline bool Contains(const MemoryView& Other) const { return (m_Data <= Other.m_Data) && (m_DataEnd >= Other.m_DataEnd); } + inline bool IsEmpty() const { return m_Data == m_DataEnd; } + const void* GetData() const { return m_Data; } + const void* GetDataEnd() const { return m_DataEnd; } size_t GetSize() const { return reinterpret_cast<const uint8_t*>(m_DataEnd) - reinterpret_cast<const uint8_t*>(m_Data); } inline bool operator==(const MemoryView& Rhs) const { return m_Data == Rhs.m_Data && m_DataEnd == Rhs.m_DataEnd; } diff --git a/zencore/include/zencore/session.h b/zencore/include/zencore/session.h index e66794704..2da41b2c8 100644 --- a/zencore/include/zencore/session.h +++ b/zencore/include/zencore/session.h @@ -1,3 +1,5 @@ +// Copyright Epic Games, Inc. All Rights Reserved. + #pragma once #include <zencore/zencore.h> @@ -8,4 +10,4 @@ struct Oid; ZENCORE_API Oid GetSessionId(); -} +} // namespace zen diff --git a/zencore/include/zencore/zencore.h b/zencore/include/zencore/zencore.h index abea4ecc8..54df7e85e 100644 --- a/zencore/include/zencore/zencore.h +++ b/zencore/include/zencore/zencore.h @@ -10,39 +10,39 @@ // Platform // -#define ZEN_PLATFORM_WINDOWS 0 -#define ZEN_PLATFORM_LINUX 0 -#define ZEN_PLATFORM_MACOS 0 +#define ZEN_PLATFORM_WINDOWS 0 +#define ZEN_PLATFORM_LINUX 0 +#define ZEN_PLATFORM_MACOS 0 #ifdef _WIN32 -# undef ZEN_PLATFORM_WINDOWS -# define ZEN_PLATFORM_WINDOWS 1 +# undef ZEN_PLATFORM_WINDOWS +# define ZEN_PLATFORM_WINDOWS 1 #elif defined(__linux__) -# undef ZEN_PLATFORM_LINUX -# define ZEN_PLATFORM_LINUX 1 +# undef ZEN_PLATFORM_LINUX +# define ZEN_PLATFORM_LINUX 1 #elif defined(__APPLE__) -# undef ZEN_PLATFORM_MACOS -# define ZEN_PLATFORM_MACOS 1 +# undef ZEN_PLATFORM_MACOS +# define ZEN_PLATFORM_MACOS 1 #endif ////////////////////////////////////////////////////////////////////////// // Compiler // -#define ZEN_COMPILER_CLANG 0 -#define ZEN_COMPILER_MSC 0 -#define ZEN_COMPILER_GCC 0 +#define ZEN_COMPILER_CLANG 0 +#define ZEN_COMPILER_MSC 0 +#define ZEN_COMPILER_GCC 0 // Clang can define __GNUC__ and/or _MSC_VER so we check for Clang first #ifdef __clang__ -# undef ZEN_COMPILER_CLANG -# define ZEN_COMPILER_CLANG 1 +# undef ZEN_COMPILER_CLANG +# define ZEN_COMPILER_CLANG 1 #elif defined(_MSC_VER) -# undef ZEN_COMPILER_MSC -# define ZEN_COMPILER_MSC 1 +# undef ZEN_COMPILER_MSC +# define ZEN_COMPILER_MSC 1 #elif defined(__GNUC__) -# undef ZEN_COMPILER_GCC -# define ZEN_COMPILER_GCC 1 +# undef ZEN_COMPILER_GCC +# define ZEN_COMPILER_GCC 1 #else # error Unknown compiler #endif @@ -56,17 +56,16 @@ # endif #endif - ////////////////////////////////////////////////////////////////////////// // Architecture // #if defined(__amd64__) || defined(_M_X64) -# define ZEN_ARCH_X64 1 -# define ZEN_ARCH_ARM64 0 +# define ZEN_ARCH_X64 1 +# define ZEN_ARCH_ARM64 0 #elif defined(__arm64__) || defined(_M_ARM64) -# define ZEN_ARCH_X64 0 -# define ZEN_ARCH_ARM64 1 +# define ZEN_ARCH_X64 0 +# define ZEN_ARCH_ARM64 1 #else # error Unknown architecture #endif @@ -142,9 +141,9 @@ char (&ZenArrayCountHelper(const T (&)[N]))[N + 1]; ////////////////////////////////////////////////////////////////////////// #if ZEN_COMPILER_MSC -# define ZEN_NOINLINE __declspec(noinline) +# define ZEN_NOINLINE __declspec(noinline) #else -# define ZEN_NOINLINE __attribute__((noinline)) +# define ZEN_NOINLINE __attribute__((noinline)) #endif #define ZEN_UNUSED(...) ((void)__VA_ARGS__) |