Browse Source

Cleaned up some docs.

tags/2021-05-28
jules 13 years ago
parent
commit
572cf1deb8
5 changed files with 23 additions and 36 deletions
  1. +1
    -1
      modules/juce_audio_plugin_client/utility/juce_IncludeModuleHeaders.h
  2. +0
    -18
      modules/juce_core/maths/juce_MathsFunctions.h
  3. +18
    -1
      modules/juce_core/memory/juce_Atomic.h
  4. +0
    -14
      modules/juce_core/memory/juce_Memory.h
  5. +4
    -2
      modules/juce_core/text/juce_CharacterFunctions.h

+ 1
- 1
modules/juce_audio_plugin_client/utility/juce_IncludeModuleHeaders.h View File

@@ -27,7 +27,7 @@
using namespace juce;
#if JUCE_MAC
#if JUCE_MAC && ! DOXYGEN
#define Point juce::Point
#define Component juce::Component
#endif

+ 0
- 18
modules/juce_core/maths/juce_MathsFunctions.h View File

@@ -298,24 +298,6 @@ inline int64 abs64 (const int64 n) noexcept
return (n >= 0) ? n : -n;
}
/** This templated negate function will negate pointers as well as integers */
template <typename Type>
inline Type juce_negate (Type n) noexcept
{
return sizeof (Type) == 1 ? (Type) -(signed char) n
: (sizeof (Type) == 2 ? (Type) -(short) n
: (sizeof (Type) == 4 ? (Type) -(int) n
: ((Type) -(int64) n)));
}
/** This templated negate function will negate pointers as well as integers */
template <typename Type>
inline Type* juce_negate (Type* n) noexcept
{
return (Type*) -(pointer_sized_int) n;
}
//==============================================================================
/** A predefined value for Pi, at double-precision.


+ 18
- 1
modules/juce_core/memory/juce_Atomic.h View File

@@ -157,6 +157,23 @@ private:
Type operator++ (int); // better to just use pre-increment with atomics..
Type operator-- (int);
/** This templated negate function will negate pointers as well as integers */
template <typename ValueType>
inline ValueType negateValue (ValueType n) noexcept
{
return sizeof (ValueType) == 1 ? (ValueType) -(signed char) n
: (sizeof (ValueType) == 2 ? (ValueType) -(short) n
: (sizeof (ValueType) == 4 ? (ValueType) -(int) n
: ((ValueType) -(int64) n)));
}
/** This templated negate function will negate pointers as well as integers */
template <typename PointerType>
inline PointerType* negateValue (PointerType* n) noexcept
{
return reinterpret_cast <PointerType*> (-reinterpret_cast <pointer_sized_int> (n));
}
};
@@ -286,7 +303,7 @@ inline Type Atomic<Type>::operator+= (const Type amountToAdd) noexcept
template <typename Type>
inline Type Atomic<Type>::operator-= (const Type amountToSubtract) noexcept
{
return operator+= (juce_negate (amountToSubtract));
return operator+= (negateValue (amountToSubtract));
}
template <typename Type>


+ 0
- 14
modules/juce_core/memory/juce_Memory.h View File

@@ -26,20 +26,6 @@
#ifndef __JUCE_MEMORY_JUCEHEADER__
#define __JUCE_MEMORY_JUCEHEADER__
//==============================================================================
#if JUCE_MSVC || DOXYGEN
/** This is a compiler-independent way of declaring a variable as being thread-local.
E.g.
@code
juce_ThreadLocal int myVariable;
@endcode
*/
#define juce_ThreadLocal __declspec(thread)
#else
#define juce_ThreadLocal __thread
#endif
//==============================================================================
#if JUCE_MINGW
/** This allocator is not defined in mingw gcc. */


+ 4
- 2
modules/juce_core/text/juce_CharacterFunctions.h View File

@@ -48,8 +48,10 @@
typedef uint32 juce_wchar;
#endif
/** This macro is deprecated, but preserved for compatibility with old code. */
#define JUCE_T(stringLiteral) (L##stringLiteral)
#ifndef DOXYGEN
/** This macro is deprecated, but preserved for compatibility with old code. */
#define JUCE_T(stringLiteral) (L##stringLiteral)
#endif
#if JUCE_DEFINE_T_MACRO
/** The 'T' macro is an alternative for using the "L" prefix in front of a string literal.


Loading…
Cancel
Save