Remove Q_PACKED from structs that don't need to be packed
Those classes don't contain padding, they don't need to be packed. The only reason to be packed was to deal with bad alignment of the WAV file. Since Q_PACKED wasn't present in all compilers, this might have been a latent bug. If that was the case, then force it to happen with more compilers. Change-Id: I8449b6bab5d62c1b7e08b9bc205b4b149ed55e28 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
This commit is contained in:
committed by
The Qt Project
parent
992a1b2605
commit
3111178ee6
@@ -40,19 +40,19 @@
|
||||
|
||||
#include "wavefilewriter.h"
|
||||
|
||||
struct Q_PACKED chunk
|
||||
struct chunk
|
||||
{
|
||||
char id[4];
|
||||
quint32 size;
|
||||
};
|
||||
|
||||
struct Q_PACKED RIFFHeader
|
||||
struct RIFFHeader
|
||||
{
|
||||
chunk descriptor; // "RIFF"
|
||||
char type[4]; // "WAVE"
|
||||
};
|
||||
|
||||
struct Q_PACKED WAVEHeader
|
||||
struct WAVEHeader
|
||||
{
|
||||
chunk descriptor;
|
||||
quint16 audioFormat;
|
||||
@@ -63,12 +63,12 @@ struct Q_PACKED WAVEHeader
|
||||
quint16 bitsPerSample;
|
||||
};
|
||||
|
||||
struct Q_PACKED DATAHeader
|
||||
struct DATAHeader
|
||||
{
|
||||
chunk descriptor;
|
||||
};
|
||||
|
||||
struct Q_PACKED CombinedHeader
|
||||
struct CombinedHeader
|
||||
{
|
||||
RIFFHeader riff;
|
||||
WAVEHeader wave;
|
||||
|
||||
Reference in New Issue
Block a user