1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Simplified ByteOrder, and made it less susceptible to UB when reading from non-aligned addresses. Removed ambiguous method ByteOrder::littleEndianInt (c1, c2, c3, c4), which was probably producing the wrong behaviour on big-endian systems

This commit is contained in:
jules 2018-03-26 12:25:02 +01:00
parent 0cfa1e4b7a
commit a632b57e7a
3 changed files with 116 additions and 135 deletions

View file

@ -29,8 +29,8 @@ namespace juce
namespace PropertyFileConstants
{
JUCE_CONSTEXPR static const int magicNumber = (int) ByteOrder::littleEndianInt ('P', 'R', 'O', 'P');
JUCE_CONSTEXPR static const int magicNumberCompressed = (int) ByteOrder::littleEndianInt ('C', 'P', 'R', 'P');
JUCE_CONSTEXPR static const int magicNumber = (int) ByteOrder::makeInt ('P', 'R', 'O', 'P');
JUCE_CONSTEXPR static const int magicNumberCompressed = (int) ByteOrder::makeInt ('C', 'P', 'R', 'P');
JUCE_CONSTEXPR static const char* const fileTag = "PROPERTIES";
JUCE_CONSTEXPR static const char* const valueTag = "VALUE";