From: <sv...@op...> - 2024-08-16 12:27:35
|
Author: manx Date: Fri Aug 16 14:27:28 2024 New Revision: 21484 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21484 Log: [Var] Run clang-format. Modified: trunk/OpenMPT/src/openmpt/fileformat_base/magic.hpp Modified: trunk/OpenMPT/src/openmpt/fileformat_base/magic.hpp ============================================================================== --- trunk/OpenMPT/src/openmpt/fileformat_base/magic.hpp Fri Aug 16 14:17:36 2024 (r21483) +++ trunk/OpenMPT/src/openmpt/fileformat_base/magic.hpp Fri Aug 16 14:27:28 2024 (r21484) @@ -16,11 +16,11 @@ // Functions to create 4-byte and 2-byte magic byte identifiers in little-endian format // Use this together with uint32le/uint16le file members. -constexpr uint32 MagicLE(const char(&id)[5]) +constexpr uint32 MagicLE(const char (&id)[5]) { return static_cast<uint32>((static_cast<uint8>(id[3]) << 24) | (static_cast<uint8>(id[2]) << 16) | (static_cast<uint8>(id[1]) << 8) | static_cast<uint8>(id[0])); } -constexpr uint16 MagicLE(const char(&id)[3]) +constexpr uint16 MagicLE(const char (&id)[3]) { return static_cast<uint16>((static_cast<uint8>(id[1]) << 8) | static_cast<uint8>(id[0])); } @@ -29,11 +29,11 @@ // Use this together with uint32be/uint16be file members. // Note: Historically, some magic bytes in MPT-specific fields are reversed (due to the use of multi-char literals). // Such fields turned up reversed in files, so MagicBE is used to keep them readable in the code. -constexpr uint32 MagicBE(const char(&id)[5]) +constexpr uint32 MagicBE(const char (&id)[5]) { return static_cast<uint32>((static_cast<uint8>(id[0]) << 24) | (static_cast<uint8>(id[1]) << 16) | (static_cast<uint8>(id[2]) << 8) | static_cast<uint8>(id[3])); } -constexpr uint16 MagicBE(const char(&id)[3]) +constexpr uint16 MagicBE(const char (&id)[3]) { return static_cast<uint16>((static_cast<uint8>(id[0]) << 8) | static_cast<uint8>(id[1])); } |