diff --git a/juce_amalgamated.cpp b/juce_amalgamated.cpp index 72721dd01d..e7791a1517 100644 --- a/juce_amalgamated.cpp +++ b/juce_amalgamated.cpp @@ -86106,7 +86106,7 @@ public: { w = font.getStringWidth (t); h = roundToInt (f.getHeight()); - isNewLine = t.containsAnyOf ("\r\n"); + isNewLine = t.containsChar ('\n') || t.containsChar ('\r'); } Token (const Token& other) throw() diff --git a/juce_amalgamated.h b/juce_amalgamated.h index 097da585c7..0da61887db 100644 --- a/juce_amalgamated.h +++ b/juce_amalgamated.h @@ -3113,12 +3113,12 @@ private: inline void* Atomic::swapPointers (void* volatile* value1, void* value2) { void* currentVal = *value1; - #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 && ! JUCE_64BIT + #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 && ! JUCE_64BIT while (! OSAtomicCompareAndSwap32 (reinterpret_cast (currentVal), reinterpret_cast (value2), - reinterpret_cast (value1))) { currentVal = *value1; } - #else + const_cast (reinterpret_cast (value1)))) { currentVal = *value1; } + #else while (! OSAtomicCompareAndSwapPtr (currentVal, value2, value1)) { currentVal = *value1; } - #endif + #endif return currentVal; } @@ -3134,11 +3134,13 @@ private: inline void* Atomic::swapPointers (void* volatile* value1, void* value2) { - #if __ia64__ - return reinterpret_cast (_InterlockedExchange64 (reinterpret_cast (value1), reinterpret_cast<__int64> (value2))); - #else - return reinterpret_cast (_InterlockedExchange (reinterpret_cast (value1), reinterpret_cast (value2))); - #endif + #if __ia64__ + return reinterpret_cast (_InterlockedExchange64 (reinterpret_cast (value1), + reinterpret_cast<__int64> (value2))); + #else + return reinterpret_cast (_InterlockedExchange (reinterpret_cast (value1), + reinterpret_cast (value2))); + #endif } #else diff --git a/src/core/juce_Atomic.h b/src/core/juce_Atomic.h index 21a54c993a..0842d874ab 100644 --- a/src/core/juce_Atomic.h +++ b/src/core/juce_Atomic.h @@ -73,12 +73,12 @@ private: inline void* Atomic::swapPointers (void* volatile* value1, void* value2) { void* currentVal = *value1; - #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 && ! JUCE_64BIT + #if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 && ! JUCE_64BIT while (! OSAtomicCompareAndSwap32 (reinterpret_cast (currentVal), reinterpret_cast (value2), - reinterpret_cast (value1))) { currentVal = *value1; } - #else + const_cast (reinterpret_cast (value1)))) { currentVal = *value1; } + #else while (! OSAtomicCompareAndSwapPtr (currentVal, value2, value1)) { currentVal = *value1; } - #endif + #endif return currentVal; } @@ -95,11 +95,13 @@ private: inline void* Atomic::swapPointers (void* volatile* value1, void* value2) { - #if __ia64__ - return reinterpret_cast (_InterlockedExchange64 (reinterpret_cast (value1), reinterpret_cast<__int64> (value2))); - #else - return reinterpret_cast (_InterlockedExchange (reinterpret_cast (value1), reinterpret_cast (value2))); - #endif + #if __ia64__ + return reinterpret_cast (_InterlockedExchange64 (reinterpret_cast (value1), + reinterpret_cast<__int64> (value2))); + #else + return reinterpret_cast (_InterlockedExchange (reinterpret_cast (value1), + reinterpret_cast (value2))); + #endif } #else