From a729c15e9dce9f5116a38afc66329ab2ca4cea54 Mon Sep 17 00:00:00 2001 From: Ellie Hermaszewska Date: Tue, 29 Oct 2024 13:59:28 +0800 Subject: preparation for clang format (#5422) * Clang-format excludes * Add .clang-format * Don't clang-format in external * Missing includes and forward declarations * Replace wonky include-once macro name * neaten include naming * Add clang-format to formatting script * Add xargs and diff to required binaries * add clang-format to ci formatting check * Add max version check to formatting script * temporarily disable checking formatting for cpp files --- source/slang/slang-serialize-types.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source/slang/slang-serialize-types.cpp') diff --git a/source/slang/slang-serialize-types.cpp b/source/slang/slang-serialize-types.cpp index a091a2850..cab108b1a 100644 --- a/source/slang/slang-serialize-types.cpp +++ b/source/slang/slang-serialize-types.cpp @@ -208,9 +208,11 @@ struct ByteReader // !!!!!!!!!!!!!!!!!!!!!!!!!!!! SerialParseUtil !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +// clang-format off #define SLANG_SERIAL_BINARY_COMPRESSION_TYPE(x) \ x(None, none) \ x(VariableByteLite, lite) +// clang-format on /* static */SlangResult SerialParseUtil::parseCompressionType(const UnownedStringSlice& text, SerialCompressionType& outType) { @@ -220,7 +222,10 @@ struct ByteReader SerialCompressionType type; }; -#define SLANG_SERIAL_BINARY_PAIR(type, name) { UnownedStringSlice::fromLiteral(#name), SerialCompressionType::type}, +// clang-format off +#define SLANG_SERIAL_BINARY_PAIR(type, name) \ + {UnownedStringSlice::fromLiteral(#name), SerialCompressionType::type}, +// clang-format on static const Pair s_pairs[] = { -- cgit v1.2.3