From: <sv...@op...> - 2024-10-26 18:33:49
|
Author: manx Date: Sat Oct 26 20:33:42 2024 New Revision: 21989 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21989 Log: [Ref] mpt/io_write/buffer.hpp: Fix formatting which clang-format misses. Modified: trunk/OpenMPT/src/mpt/io_write/buffer.hpp Modified: trunk/OpenMPT/src/mpt/io_write/buffer.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/io_write/buffer.hpp Sat Oct 26 19:48:55 2024 (r21988) +++ trunk/OpenMPT/src/mpt/io_write/buffer.hpp Sat Oct 26 20:33:42 2024 (r21989) @@ -46,18 +46,17 @@ inline WriteBuffer(Tfile & f_, mpt::byte_span buffer_) : buffer(buffer_) , f(f_) { + return; } inline ~WriteBuffer() noexcept(false) { - if (!writeError) - { + if (!writeError) { FlushLocal(); } } public: inline Tfile & file() const { - if (IsDirty()) - { + if (IsDirty()) { FlushLocal(); } return f; @@ -84,30 +83,24 @@ } inline bool Write(mpt::const_byte_span data) { bool result = true; - for (std::size_t i = 0; i < data.size(); ++i) - { + for (std::size_t i = 0; i < data.size(); ++i) { buffer[size] = data[i]; size++; - if (IsFull()) - { + if (IsFull()) { FlushLocal(); } } return result; } inline void FlushLocal() { - if (IsClean()) - { + if (IsClean()) { return; } - try - { - if (!mpt::IO::WriteRaw(f, mpt::as_span(buffer.data(), size))) - { + try { + if (!mpt::IO::WriteRaw(f, mpt::as_span(buffer.data(), size))) { writeError = true; } - } catch (const std::exception &) - { + } catch (const std::exception &) { writeError = true; throw; } |