From 719fd47aa757f2104e936fbebc5b4253bc423b43 Mon Sep 17 00:00:00 2001 From: monsieurgustav Date: Wed, 1 Feb 2017 20:49:58 +0100 Subject: [PATCH] compilefix: redefinition of 'RoundUp4' on iOS --- .../Private/Common/oscpack/osc/OscOutboundPacketStream.cpp | 7 ------- .../OSC/Private/Common/oscpack/osc/OscReceivedElements.cpp | 7 ------- OSC/Source/OSC/Private/Common/oscpack/osc/OscTypes.h | 7 +++++++ 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/OSC/Source/OSC/Private/Common/oscpack/osc/OscOutboundPacketStream.cpp b/OSC/Source/OSC/Private/Common/oscpack/osc/OscOutboundPacketStream.cpp index 2a908d4..ae94483 100644 --- a/OSC/Source/OSC/Private/Common/oscpack/osc/OscOutboundPacketStream.cpp +++ b/OSC/Source/OSC/Private/Common/oscpack/osc/OscOutboundPacketStream.cpp @@ -148,13 +148,6 @@ static void FromUInt64( char *p, uint64 x ) } -// round up to the next highest multiple of 4. unless x is already a multiple of 4 -static inline std::size_t RoundUp4( std::size_t x ) -{ - return (x + 3) & ~((std::size_t)0x03); -} - - OutboundPacketStream::OutboundPacketStream( char *buffer, std::size_t capacity ) : data_( buffer ) , end_( data_ + capacity ) diff --git a/OSC/Source/OSC/Private/Common/oscpack/osc/OscReceivedElements.cpp b/OSC/Source/OSC/Private/Common/oscpack/osc/OscReceivedElements.cpp index c9d895b..c6f6c70 100644 --- a/OSC/Source/OSC/Private/Common/oscpack/osc/OscReceivedElements.cpp +++ b/OSC/Source/OSC/Private/Common/oscpack/osc/OscReceivedElements.cpp @@ -86,13 +86,6 @@ static inline const char* FindStr4End( const char *p, const char *end ) } -// round up to the next highest multiple of 4. unless x is already a multiple of 4 -static inline uint32 RoundUp4( uint32 x ) -{ - return (x + 3) & ~((uint32)0x03); -} - - static inline int32 ToInt32( const char *p ) { #ifdef OSC_HOST_LITTLE_ENDIAN diff --git a/OSC/Source/OSC/Private/Common/oscpack/osc/OscTypes.h b/OSC/Source/OSC/Private/Common/oscpack/osc/OscTypes.h index aabe09f..c13fb7c 100644 --- a/OSC/Source/OSC/Private/Common/oscpack/osc/OscTypes.h +++ b/OSC/Source/OSC/Private/Common/oscpack/osc/OscTypes.h @@ -110,6 +110,13 @@ inline bool IsMultipleOf4( osc_bundle_element_size_t x ) } +// round up to the next highest multiple of 4. unless x is already a multiple of 4 +static inline std::size_t RoundUp4( std::size_t x ) +{ + return (x + 3) & ~((std::size_t)0x03); +} + + enum TypeTagValues { TRUE_TYPE_TAG = 'T', FALSE_TYPE_TAG = 'F',