mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-21 01:59:44 +00:00
Codechange: remove unneeded packing of ChunkHeader and WAVE_DOWNLOAD
This commit is contained in:
@@ -146,18 +146,18 @@ private:
|
||||
};
|
||||
|
||||
/** A RIFF chunk header. */
|
||||
PACK_N(struct ChunkHeader {
|
||||
struct ChunkHeader {
|
||||
FOURCC type; ///< Chunk type.
|
||||
DWORD length; ///< Length of the chunk, not including the chunk header itself.
|
||||
}, 2);
|
||||
};
|
||||
|
||||
/** Buffer format for a DLS wave download. */
|
||||
PACK_N(struct WAVE_DOWNLOAD {
|
||||
DMUS_DOWNLOADINFO dlInfo;
|
||||
ULONG ulOffsetTable[2];
|
||||
DMUS_WAVE dmWave;
|
||||
DMUS_WAVEDATA dmWaveData;
|
||||
}, 2);
|
||||
struct WAVE_DOWNLOAD {
|
||||
DMUS_DOWNLOADINFO dlInfo; ///< Request header for the to be downloaded wave data.
|
||||
ULONG ulOffsetTable[2]; ///< Offsets to the \c dmWave and \c dmWaveData fields.
|
||||
DMUS_WAVE dmWave; ///< Definition of the wave chunk to download.
|
||||
DMUS_WAVEDATA dmWaveData; ///< The buffer the wave chunk data is written to.
|
||||
};
|
||||
|
||||
struct PlaybackSegment {
|
||||
uint32_t start, end;
|
||||
|
||||
@@ -176,15 +176,6 @@ using namespace std::literals::string_view_literals;
|
||||
# define PATHSEPCHAR '/'
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# define PACK_N(type_dec, n) __pragma(pack(push, n)) type_dec; __pragma(pack(pop))
|
||||
#elif defined(__MINGW32__)
|
||||
# define PRAGMA(x) _Pragma(#x)
|
||||
# define PACK_N(type_dec, n) PRAGMA(pack(push, n)) type_dec; PRAGMA(pack(pop))
|
||||
#else
|
||||
# define PACK_N(type_dec, n) type_dec __attribute__((__packed__, aligned(n)))
|
||||
#endif
|
||||
|
||||
/** @def debug_inline
|
||||
* When making a (pure) debug build, the compiler will by default disable
|
||||
* inlining of functions. This has a detrimental effect on the performance of
|
||||
|
||||
Reference in New Issue
Block a user