From 842d30fbfa194ed1dffa53933271cef024b03721 Mon Sep 17 00:00:00 2001 From: jules Date: Tue, 4 Sep 2012 11:38:16 +0100 Subject: [PATCH] Minor tidying-up. --- .../Application/jucer_FilePreviewComponent.h | 4 +- .../Source/Utility/jucer_FileHelpers.h | 4 +- .../buffers/juce_AudioDataConverters.h | 14 +++---- modules/juce_core/containers/juce_HashMap.h | 4 +- .../containers/juce_ReferenceCountedArray.h | 20 +++++----- modules/juce_core/maths/juce_Expression.cpp | 37 +++++++++---------- modules/juce_core/maths/juce_Range.h | 4 +- modules/juce_core/memory/juce_WeakReference.h | 2 +- .../native/juce_android_JNIHelpers.h | 14 +++---- .../juce_core/native/juce_posix_SharedCode.h | 7 ++-- .../juce_core/native/juce_win32_ComSmartPtr.h | 8 ++-- .../juce_core/threads/juce_ThreadLocalValue.h | 4 +- .../values/juce_ValueTree.h | 2 +- .../broadcasters/juce_ListenerList.h | 4 +- .../colour/juce_ColourGradient.h | 4 +- .../juce_graphics/colour/juce_PixelFormats.h | 12 +++--- .../geometry/juce_AffineTransform.cpp | 8 ++-- .../native/juce_mac_CoreGraphicsContext.h | 2 +- .../placement/juce_Justification.h | 6 +-- .../placement/juce_RectanglePlacement.h | 6 +-- .../components/juce_ModalComponentManager.h | 16 ++++---- .../juce_gui_basics/drawables/juce_Drawable.h | 6 +-- .../filebrowser/juce_WildcardFileFilter.cpp | 6 +-- .../juce_RelativeCoordinatePositioner.h | 4 +- .../misc/juce_ColourSelector.cpp | 22 +++++------ .../juce_opengl/native/juce_OpenGL_android.h | 4 +- .../juce_opengl/native/juce_OpenGL_linux.h | 4 +- modules/juce_opengl/opengl/juce_Quaternion.h | 2 +- 28 files changed, 113 insertions(+), 117 deletions(-) diff --git a/extras/Introjucer/Source/Application/jucer_FilePreviewComponent.h b/extras/Introjucer/Source/Application/jucer_FilePreviewComponent.h index d761918684..53d081f2d3 100644 --- a/extras/Introjucer/Source/Application/jucer_FilePreviewComponent.h +++ b/extras/Introjucer/Source/Application/jucer_FilePreviewComponent.h @@ -33,8 +33,8 @@ class ItemPreviewComponent : public Component { public: - ItemPreviewComponent (const File& file_) - : file (file_) + ItemPreviewComponent (const File& f) + : file (f) { setOpaque (true); tryToLoadImage(); diff --git a/extras/Introjucer/Source/Utility/jucer_FileHelpers.h b/extras/Introjucer/Source/Utility/jucer_FileHelpers.h index b93e089331..ac6c0c9e5b 100644 --- a/extras/Introjucer/Source/Utility/jucer_FileHelpers.h +++ b/extras/Introjucer/Source/Utility/jucer_FileHelpers.h @@ -54,8 +54,8 @@ namespace FileHelpers class FileModificationDetector { public: - FileModificationDetector (const File& file_) - : file (file_) + FileModificationDetector (const File& f) + : file (f) { } diff --git a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h index e70551462d..a356ed8c05 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h +++ b/modules/juce_audio_basics/buffers/juce_AudioDataConverters.h @@ -100,7 +100,7 @@ public: class Int8 { public: - inline Int8 (void* data_) noexcept : data (static_cast (data_)) {} + inline Int8 (void* d) noexcept : data (static_cast (d)) {} inline void advance() noexcept { ++data; } inline void skip (int numSamples) noexcept { data += numSamples; } @@ -125,7 +125,7 @@ public: class UInt8 { public: - inline UInt8 (void* data_) noexcept : data (static_cast (data_)) {} + inline UInt8 (void* d) noexcept : data (static_cast (d)) {} inline void advance() noexcept { ++data; } inline void skip (int numSamples) noexcept { data += numSamples; } @@ -150,7 +150,7 @@ public: class Int16 { public: - inline Int16 (void* data_) noexcept : data (static_cast (data_)) {} + inline Int16 (void* d) noexcept : data (static_cast (d)) {} inline void advance() noexcept { ++data; } inline void skip (int numSamples) noexcept { data += numSamples; } @@ -175,7 +175,7 @@ public: class Int24 { public: - inline Int24 (void* data_) noexcept : data (static_cast (data_)) {} + inline Int24 (void* d) noexcept : data (static_cast (d)) {} inline void advance() noexcept { data += 3; } inline void skip (int numSamples) noexcept { data += 3 * numSamples; } @@ -200,7 +200,7 @@ public: class Int32 { public: - inline Int32 (void* data_) noexcept : data (static_cast (data_)) {} + inline Int32 (void* d) noexcept : data (static_cast (d)) {} inline void advance() noexcept { ++data; } inline void skip (int numSamples) noexcept { data += numSamples; } @@ -225,7 +225,7 @@ public: class Float32 { public: - inline Float32 (void* data_) noexcept : data (static_cast (data_)) {} + inline Float32 (void* d) noexcept : data (static_cast (d)) {} inline void advance() noexcept { ++data; } inline void skip (int numSamples) noexcept { data += numSamples; } @@ -275,7 +275,7 @@ public: public: inline Interleaved() noexcept : numInterleavedChannels (1) {} inline Interleaved (const Interleaved& other) noexcept : numInterleavedChannels (other.numInterleavedChannels) {} - inline Interleaved (const int numInterleavedChannels_) noexcept : numInterleavedChannels (numInterleavedChannels_) {} + inline Interleaved (const int numInterleavedChans) noexcept : numInterleavedChannels (numInterleavedChans) {} inline void copyFrom (const Interleaved& other) noexcept { numInterleavedChannels = other.numInterleavedChannels; } template inline void advanceData (SampleFormatType& s) noexcept { s.skip (numInterleavedChannels); } template inline void advanceDataBy (SampleFormatType& s, int numSamples) noexcept { s.skip (numInterleavedChannels * numSamples); } diff --git a/modules/juce_core/containers/juce_HashMap.h b/modules/juce_core/containers/juce_HashMap.h index 95d04bbafe..6226535fed 100644 --- a/modules/juce_core/containers/juce_HashMap.h +++ b/modules/juce_core/containers/juce_HashMap.h @@ -336,8 +336,8 @@ private: class HashEntry { public: - HashEntry (KeyTypeParameter key_, ValueTypeParameter value_, HashEntry* const nextEntry_) - : key (key_), value (value_), nextEntry (nextEntry_) + HashEntry (KeyTypeParameter k, ValueTypeParameter val, HashEntry* const next) + : key (k), value (val), nextEntry (next) {} const KeyType key; diff --git a/modules/juce_core/containers/juce_ReferenceCountedArray.h b/modules/juce_core/containers/juce_ReferenceCountedArray.h index 88c9b875ae..810cdb1f0f 100644 --- a/modules/juce_core/containers/juce_ReferenceCountedArray.h +++ b/modules/juce_core/containers/juce_ReferenceCountedArray.h @@ -248,9 +248,9 @@ public: { const ScopedLockType lock (getLock()); ObjectClass** e = data.elements.getData(); - ObjectClass** const end_ = e + numUsed; + ObjectClass** const endPointer = e + numUsed; - while (e != end_) + while (e != endPointer) { if (objectToLookFor == *e) return static_cast (e - data.elements.getData()); @@ -270,9 +270,9 @@ public: { const ScopedLockType lock (getLock()); ObjectClass** e = data.elements.getData(); - ObjectClass** const end_ = e + numUsed; + ObjectClass** const endPointer = e + numUsed; - while (e != end_) + while (e != endPointer) { if (objectToLookFor == *e) return true; @@ -616,13 +616,13 @@ public: { const ScopedLockType lock (getLock()); - const int start = jlimit (0, numUsed, startIndex); - const int end_ = jlimit (0, numUsed, startIndex + numberToRemove); + const int start = jlimit (0, numUsed, startIndex); + const int endIndex = jlimit (0, numUsed, startIndex + numberToRemove); - if (end_ > start) + if (endIndex > start) { int i; - for (i = start; i < end_; ++i) + for (i = start; i < endIndex; ++i) { if (data.elements[i] != nullptr) { @@ -631,9 +631,9 @@ public: } } - const int rangeSize = end_ - start; + const int rangeSize = endIndex - start; ObjectClass** e = data.elements + start; - i = numUsed - end_; + i = numUsed - endIndex; numUsed -= rangeSize; while (--i >= 0) diff --git a/modules/juce_core/maths/juce_Expression.cpp b/modules/juce_core/maths/juce_Expression.cpp index b8a1dcf9f3..8cb98639d8 100644 --- a/modules/juce_core/maths/juce_Expression.cpp +++ b/modules/juce_core/maths/juce_Expression.cpp @@ -95,8 +95,7 @@ struct Expression::Helpers class EvaluationError : public std::exception { public: - EvaluationError (const String& description_) - : description (description_) + EvaluationError (const String& desc) : description (desc) { DBG ("Expression::EvaluationError: " + description); } @@ -108,8 +107,8 @@ struct Expression::Helpers class Constant : public Term { public: - Constant (const double value_, const bool isResolutionTarget_) - : value (value_), isResolutionTarget (isResolutionTarget_) {} + Constant (const double val, const bool resolutionTarget) + : value (val), isResolutionTarget (resolutionTarget) {} Type getType() const noexcept { return constantType; } Term* clone() const { return new Constant (value, isResolutionTarget); } @@ -199,7 +198,7 @@ struct Expression::Helpers class SymbolTerm : public Term { public: - explicit SymbolTerm (const String& symbol_) : symbol (symbol_) {} + explicit SymbolTerm (const String& sym) : symbol (sym) {} TermPtr resolve (const Scope& scope, int recursionDepth) { @@ -232,10 +231,10 @@ struct Expression::Helpers class Function : public Term { public: - explicit Function (const String& functionName_) : functionName (functionName_) {} + explicit Function (const String& name) : functionName (name) {} - Function (const String& functionName_, const Array& parameters_) - : functionName (functionName_), parameters (parameters_) + Function (const String& name, const Array& params) + : functionName (name), parameters (params) {} Type getType() const noexcept { return functionType; } @@ -351,8 +350,8 @@ struct Expression::Helpers class EvaluationVisitor : public Scope::Visitor { public: - EvaluationVisitor (const TermPtr& input_, const int recursionCount_) - : input (input_), output (input_), recursionCount (recursionCount_) {} + EvaluationVisitor (const TermPtr& term, const int recursion) + : input (term), output (term), recursionCount (recursion) {} void visit (const Scope& scope) { output = input->resolve (scope, recursionCount); } @@ -367,8 +366,8 @@ struct Expression::Helpers class SymbolVisitingVisitor : public Scope::Visitor { public: - SymbolVisitingVisitor (const TermPtr& input_, SymbolVisitor& visitor_, const int recursionCount_) - : input (input_), visitor (visitor_), recursionCount (recursionCount_) {} + SymbolVisitingVisitor (const TermPtr& term, SymbolVisitor& v, const int recursion) + : input (term), visitor (v), recursionCount (recursion) {} void visit (const Scope& scope) { input->visitAllSymbols (visitor, scope, recursionCount); } @@ -383,8 +382,8 @@ struct Expression::Helpers class SymbolRenamingVisitor : public Scope::Visitor { public: - SymbolRenamingVisitor (const TermPtr& input_, const Expression::Symbol& symbol_, const String& newName_, const int recursionCount_) - : input (input_), symbol (symbol_), newName (newName_), recursionCount (recursionCount_) {} + SymbolRenamingVisitor (const TermPtr& term, const Expression::Symbol& symbol_, const String& newName_, const int recursionCount_) + : input (term), symbol (symbol_), newName (newName_), recursionCount (recursionCount_) {} void visit (const Scope& scope) { input->renameSymbol (symbol, newName, scope, recursionCount); } @@ -406,9 +405,9 @@ struct Expression::Helpers class Negate : public Term { public: - explicit Negate (const TermPtr& input_) : input (input_) + explicit Negate (const TermPtr& term) : input (term) { - jassert (input_ != nullptr); + jassert (term != nullptr); } Type getType() const noexcept { return operatorType; } @@ -425,10 +424,10 @@ struct Expression::Helpers String getName() const { return "-"; } TermPtr negated() { return input; } - TermPtr createTermToEvaluateInput (const Scope& scope, const Term* input_, double overallTarget, Term* topLevelTerm) const + TermPtr createTermToEvaluateInput (const Scope& scope, const Term* term, double overallTarget, Term* topLevelTerm) const { - (void) input_; - jassert (input_ == input); + (void) term; + jassert (term == input); const Term* const dest = findDestinationFor (topLevelTerm, this); diff --git a/modules/juce_core/maths/juce_Range.h b/modules/juce_core/maths/juce_Range.h index 14a4699b3a..625a6d0b34 100644 --- a/modules/juce_core/maths/juce_Range.h +++ b/modules/juce_core/maths/juce_Range.h @@ -46,8 +46,8 @@ public: } /** Constructs a range with given start and end values. */ - Range (const ValueType start_, const ValueType end_) noexcept - : start (start_), end (jmax (start_, end_)) + Range (const ValueType startValue, const ValueType endValue) noexcept + : start (startValue), end (jmax (startValue, endValue)) { } diff --git a/modules/juce_core/memory/juce_WeakReference.h b/modules/juce_core/memory/juce_WeakReference.h index 030e641bfb..64b83919a3 100644 --- a/modules/juce_core/memory/juce_WeakReference.h +++ b/modules/juce_core/memory/juce_WeakReference.h @@ -133,7 +133,7 @@ public: class SharedPointer : public ReferenceCountingType { public: - explicit SharedPointer (ObjectType* const owner_) noexcept : owner (owner_) {} + explicit SharedPointer (ObjectType* const obj) noexcept : owner (obj) {} inline ObjectType* get() const noexcept { return owner; } void clearPointer() noexcept { owner = nullptr; } diff --git a/modules/juce_core/native/juce_android_JNIHelpers.h b/modules/juce_core/native/juce_android_JNIHelpers.h index f454c87647..00f9c541fd 100644 --- a/modules/juce_core/native/juce_android_JNIHelpers.h +++ b/modules/juce_core/native/juce_android_JNIHelpers.h @@ -38,7 +38,7 @@ class GlobalRef { public: inline GlobalRef() noexcept : obj (0) {} - inline explicit GlobalRef (jobject obj_) : obj (retain (obj_)) {} + inline explicit GlobalRef (jobject o) : obj (retain (o)) {} inline GlobalRef (const GlobalRef& other) : obj (retain (other.obj)) {} ~GlobalRef() { clear(); } @@ -97,9 +97,9 @@ private: //============================================================================== jobject obj; - static inline jobject retain (jobject obj_) + static inline jobject retain (jobject obj) { - return obj_ == 0 ? 0 : getEnv()->NewGlobalRef (obj_); + return obj == 0 ? 0 : getEnv()->NewGlobalRef (obj); } }; @@ -108,7 +108,7 @@ template class LocalRef { public: - explicit inline LocalRef (JavaType obj_) noexcept : obj (obj_) {} + explicit inline LocalRef (JavaType o) noexcept : obj (o) {} inline LocalRef (const LocalRef& other) noexcept : obj (retain (other.obj)) {} ~LocalRef() { clear(); } @@ -132,9 +132,9 @@ public: private: JavaType obj; - static JavaType retain (JavaType obj_) + static JavaType retain (JavaType obj) { - return obj_ == 0 ? 0 : (JavaType) getEnv()->NewLocalRef (obj_); + return obj == 0 ? 0 : (JavaType) getEnv()->NewLocalRef (obj); } }; @@ -172,7 +172,7 @@ namespace class JNIClassBase { public: - explicit JNIClassBase (const char* classPath_); + explicit JNIClassBase (const char* classPath); virtual ~JNIClassBase(); inline operator jclass() const noexcept { return classRef; } diff --git a/modules/juce_core/native/juce_posix_SharedCode.h b/modules/juce_core/native/juce_posix_SharedCode.h index cf9ce96e41..a64e6bd843 100644 --- a/modules/juce_core/native/juce_posix_SharedCode.h +++ b/modules/juce_core/native/juce_posix_SharedCode.h @@ -67,9 +67,9 @@ void CriticalSection::exit() const noexcept class WaitableEventImpl { public: - WaitableEventImpl (const bool manualReset_) + WaitableEventImpl (const bool useManualReset) : triggered (false), - manualReset (manualReset_) + manualReset (useManualReset) { pthread_cond_init (&condition, 0); @@ -773,8 +773,7 @@ public: int handle, refCount; }; -InterProcessLock::InterProcessLock (const String& name_) - : name (name_) +InterProcessLock::InterProcessLock (const String& nm) : name (nm) { } diff --git a/modules/juce_core/native/juce_win32_ComSmartPtr.h b/modules/juce_core/native/juce_win32_ComSmartPtr.h index d4373b9acd..48bc91d7c6 100644 --- a/modules/juce_core/native/juce_win32_ComSmartPtr.h +++ b/modules/juce_core/native/juce_win32_ComSmartPtr.h @@ -34,10 +34,10 @@ template class ComSmartPtr { public: - ComSmartPtr() throw() : p (0) {} - ComSmartPtr (ComClass* const p_) : p (p_) { if (p_ != 0) p_->AddRef(); } - ComSmartPtr (const ComSmartPtr& p_) : p (p_.p) { if (p != 0) p ->AddRef(); } - ~ComSmartPtr() { release(); } + ComSmartPtr() throw() : p (0) {} + ComSmartPtr (ComClass* const obj) : p (obj) { if (p) p->AddRef(); } + ComSmartPtr (const ComSmartPtr& other) : p (other.p) { if (p) p->AddRef(); } + ~ComSmartPtr() { release(); } operator ComClass*() const throw() { return p; } ComClass& operator*() const throw() { return *p; } diff --git a/modules/juce_core/threads/juce_ThreadLocalValue.h b/modules/juce_core/threads/juce_ThreadLocalValue.h index c6a5e8b45b..e4e3d249f5 100644 --- a/modules/juce_core/threads/juce_ThreadLocalValue.h +++ b/modules/juce_core/threads/juce_ThreadLocalValue.h @@ -174,8 +174,8 @@ private: #if JUCE_NO_COMPILER_THREAD_LOCAL struct ObjectHolder { - ObjectHolder (const Thread::ThreadID& threadId_) - : threadId (threadId_), object() + ObjectHolder (const Thread::ThreadID& tid) + : threadId (tid), object() {} Thread::ThreadID threadId; diff --git a/modules/juce_data_structures/values/juce_ValueTree.h b/modules/juce_data_structures/values/juce_ValueTree.h index d8f7b47cab..7db335441c 100644 --- a/modules/juce_data_structures/values/juce_ValueTree.h +++ b/modules/juce_data_structures/values/juce_ValueTree.h @@ -505,7 +505,7 @@ private: template struct ComparatorAdapter { - ComparatorAdapter (ElementComparator& comparator_) noexcept : comparator (comparator_) {} + ComparatorAdapter (ElementComparator& comp) noexcept : comparator (comp) {} int compareElements (const ValueTree* const first, const ValueTree* const second) { diff --git a/modules/juce_events/broadcasters/juce_ListenerList.h b/modules/juce_events/broadcasters/juce_ListenerList.h index ca3ca7638c..8f68f61ed0 100644 --- a/modules/juce_events/broadcasters/juce_ListenerList.h +++ b/modules/juce_events/broadcasters/juce_ListenerList.h @@ -281,8 +281,8 @@ public: { public: //============================================================================== - Iterator (const ListType& list_) noexcept - : list (list_), index (list_.size()) + Iterator (const ListType& listToIterate) noexcept + : list (listToIterate), index (listToIterate.size()) {} ~Iterator() noexcept {} diff --git a/modules/juce_graphics/colour/juce_ColourGradient.h b/modules/juce_graphics/colour/juce_ColourGradient.h index dd4caca78e..2ad7fcaa98 100644 --- a/modules/juce_graphics/colour/juce_ColourGradient.h +++ b/modules/juce_graphics/colour/juce_ColourGradient.h @@ -165,8 +165,8 @@ private: { ColourPoint() noexcept {} - ColourPoint (const double position_, const Colour& colour_) noexcept - : position (position_), colour (colour_) + ColourPoint (const double pos, const Colour& col) noexcept + : position (pos), colour (col) {} bool operator== (const ColourPoint& other) const noexcept; diff --git a/modules/juce_graphics/colour/juce_PixelFormats.h b/modules/juce_graphics/colour/juce_PixelFormats.h index 9b3a29b7cc..5dffef611c 100644 --- a/modules/juce_graphics/colour/juce_PixelFormats.h +++ b/modules/juce_graphics/colour/juce_PixelFormats.h @@ -53,8 +53,8 @@ public: /** Creates a pixel from a 32-bit argb value. */ - PixelARGB (const uint32 argb_) noexcept - : argb (argb_) + PixelARGB (const uint32 argbValue) noexcept + : argb (argbValue) { } @@ -427,11 +427,11 @@ public: forcedinline void multiplyAlpha (float) noexcept {} /** Sets the pixel's colour from individual components. */ - void setARGB (const uint8, const uint8 r_, const uint8 g_, const uint8 b_) noexcept + void setARGB (const uint8, const uint8 red, const uint8 green, const uint8 blue) noexcept { - r = r_; - g = g_; - b = b_; + r = red; + g = green; + b = blue; } /** Premultiplies the pixel's RGB values by its alpha. */ diff --git a/modules/juce_graphics/geometry/juce_AffineTransform.cpp b/modules/juce_graphics/geometry/juce_AffineTransform.cpp index 3acd1e72b2..51d5a2587c 100644 --- a/modules/juce_graphics/geometry/juce_AffineTransform.cpp +++ b/modules/juce_graphics/geometry/juce_AffineTransform.cpp @@ -35,10 +35,10 @@ AffineTransform::AffineTransform (const AffineTransform& other) noexcept { } -AffineTransform::AffineTransform (const float mat00_, const float mat01_, const float mat02_, - const float mat10_, const float mat11_, const float mat12_) noexcept - : mat00 (mat00_), mat01 (mat01_), mat02 (mat02_), - mat10 (mat10_), mat11 (mat11_), mat12 (mat12_) +AffineTransform::AffineTransform (const float m00, const float m01, const float m02, + const float m10, const float m11, const float m12) noexcept + : mat00 (m00), mat01 (m01), mat02 (m02), + mat10 (m10), mat11 (m11), mat12 (m12) { } diff --git a/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.h b/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.h index a82c2061be..055f12cae4 100644 --- a/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.h +++ b/modules/juce_graphics/native/juce_mac_CoreGraphicsContext.h @@ -30,7 +30,7 @@ class CoreGraphicsContext : public LowLevelGraphicsContext { public: - CoreGraphicsContext (CGContextRef context_, const float flipHeight_, const float targetScale_); + CoreGraphicsContext (CGContextRef context, const float flipHeight, const float targetScale); ~CoreGraphicsContext(); //============================================================================== diff --git a/modules/juce_graphics/placement/juce_Justification.h b/modules/juce_graphics/placement/juce_Justification.h index d598d90fe3..eac13926b7 100644 --- a/modules/juce_graphics/placement/juce_Justification.h +++ b/modules/juce_graphics/placement/juce_Justification.h @@ -42,8 +42,8 @@ class JUCE_API Justification { public: //============================================================================== - /** Creates a Justification object using a combination of flags. */ - inline Justification (int flags_) noexcept : flags (flags_) {} + /** Creates a Justification object using a combination of flags from the Flags enum. */ + inline Justification (int justificationFlags) noexcept : flags (justificationFlags) {} /** Creates a copy of another Justification object. */ Justification (const Justification& other) noexcept; @@ -103,7 +103,7 @@ public: //============================================================================== /** Flag values that can be combined and used in the constructor. */ - enum + enum Flags { //============================================================================== /** Indicates that the item should be aligned against the left edge of the available space. */ diff --git a/modules/juce_graphics/placement/juce_RectanglePlacement.h b/modules/juce_graphics/placement/juce_RectanglePlacement.h index acc67090bf..7914822297 100644 --- a/modules/juce_graphics/placement/juce_RectanglePlacement.h +++ b/modules/juce_graphics/placement/juce_RectanglePlacement.h @@ -42,8 +42,8 @@ class JUCE_API RectanglePlacement { public: //============================================================================== - /** Creates a RectanglePlacement object using a combination of flags. */ - inline RectanglePlacement (int flags_) noexcept : flags (flags_) {} + /** Creates a RectanglePlacement object using a combination of flags from the Flags enum. */ + inline RectanglePlacement (int placementFlags) noexcept : flags (placementFlags) {} /** Creates a copy of another RectanglePlacement object. */ RectanglePlacement (const RectanglePlacement& other) noexcept; @@ -56,7 +56,7 @@ public: //============================================================================== /** Flag values that can be combined and used in the constructor. */ - enum + enum Flags { //============================================================================== /** Indicates that the source rectangle's left edge should be aligned with the left edge of the target rectangle. */ diff --git a/modules/juce_gui_basics/components/juce_ModalComponentManager.h b/modules/juce_gui_basics/components/juce_ModalComponentManager.h index 39e27bdeae..b70c2ad884 100644 --- a/modules/juce_gui_basics/components/juce_ModalComponentManager.h +++ b/modules/juce_gui_basics/components/juce_ModalComponentManager.h @@ -282,8 +282,8 @@ private: public: typedef void (*FunctionType) (int, ParamType); - FunctionCaller1 (FunctionType& function_, ParamType& param_) - : function (function_), param (param_) {} + FunctionCaller1 (FunctionType& f, ParamType& p1) + : function (f), param (p1) {} void modalStateFinished (int returnValue) { function (returnValue, param); } @@ -300,8 +300,8 @@ private: public: typedef void (*FunctionType) (int, ParamType1, ParamType2); - FunctionCaller2 (FunctionType& function_, ParamType1& param1_, ParamType2& param2_) - : function (function_), param1 (param1_), param2 (param2_) {} + FunctionCaller2 (FunctionType& f, ParamType1& p1, ParamType2& p2) + : function (f), param1 (p1), param2 (p2) {} void modalStateFinished (int returnValue) { function (returnValue, param1, param2); } @@ -319,8 +319,8 @@ private: public: typedef void (*FunctionType) (int, ComponentType*); - ComponentCaller1 (FunctionType& function_, ComponentType* comp_) - : function (function_), comp (comp_) {} + ComponentCaller1 (FunctionType& f, ComponentType* c) + : function (f), comp (c) {} void modalStateFinished (int returnValue) { @@ -340,8 +340,8 @@ private: public: typedef void (*FunctionType) (int, ComponentType*, ParamType1); - ComponentCaller2 (FunctionType& function_, ComponentType* comp_, ParamType1 param1_) - : function (function_), comp (comp_), param1 (param1_) {} + ComponentCaller2 (FunctionType& f, ComponentType* c, ParamType1 p1) + : function (f), comp (c), param1 (p1) {} void modalStateFinished (int returnValue) { diff --git a/modules/juce_gui_basics/drawables/juce_Drawable.h b/modules/juce_gui_basics/drawables/juce_Drawable.h index 3fbb73d7db..5a0d4cb1d3 100644 --- a/modules/juce_gui_basics/drawables/juce_Drawable.h +++ b/modules/juce_gui_basics/drawables/juce_Drawable.h @@ -221,9 +221,9 @@ protected: class Positioner : public RelativeCoordinatePositionerBase { public: - Positioner (DrawableType& component_) - : RelativeCoordinatePositionerBase (component_), - owner (component_) + Positioner (DrawableType& c) + : RelativeCoordinatePositionerBase (c), + owner (c) {} bool registerCoordinates() { return owner.registerCoordinates (*this); } diff --git a/modules/juce_gui_basics/filebrowser/juce_WildcardFileFilter.cpp b/modules/juce_gui_basics/filebrowser/juce_WildcardFileFilter.cpp index 2962635994..fa3c220f5a 100644 --- a/modules/juce_gui_basics/filebrowser/juce_WildcardFileFilter.cpp +++ b/modules/juce_gui_basics/filebrowser/juce_WildcardFileFilter.cpp @@ -25,9 +25,9 @@ WildcardFileFilter::WildcardFileFilter (const String& fileWildcardPatterns, const String& directoryWildcardPatterns, - const String& description_) - : FileFilter (description_.isEmpty() ? fileWildcardPatterns - : (description_ + " (" + fileWildcardPatterns + ")")) + const String& desc) + : FileFilter (desc.isEmpty() ? fileWildcardPatterns + : (desc + " (" + fileWildcardPatterns + ")")) { parse (fileWildcardPatterns, fileWildcards); parse (directoryWildcardPatterns, directoryWildcards); diff --git a/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.h b/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.h index 919ee53998..e507f6a1e1 100644 --- a/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.h +++ b/modules/juce_gui_basics/positioning/juce_RelativeCoordinatePositioner.h @@ -40,7 +40,7 @@ class JUCE_API RelativeCoordinatePositionerBase : public Component::Positioner public MarkerList::Listener { public: - RelativeCoordinatePositionerBase (Component& component_); + RelativeCoordinatePositionerBase (Component& component); ~RelativeCoordinatePositionerBase(); void componentMovedOrResized (Component&, bool, bool); @@ -60,7 +60,7 @@ public: class ComponentScope : public Expression::Scope { public: - ComponentScope (Component& component_); + ComponentScope (Component& component); Expression getSymbolValue (const String& symbol) const; void visitRelativeScope (const String& scopeName, Visitor& visitor) const; diff --git a/modules/juce_gui_extra/misc/juce_ColourSelector.cpp b/modules/juce_gui_extra/misc/juce_ColourSelector.cpp index 925c4176b8..cc92ca3e94 100644 --- a/modules/juce_gui_extra/misc/juce_ColourSelector.cpp +++ b/modules/juce_gui_extra/misc/juce_ColourSelector.cpp @@ -71,8 +71,8 @@ private: class ColourSelector::ColourSpaceView : public Component { public: - ColourSpaceView (ColourSelector& owner_, float& h_, float& s_, float& v_, const int edgeSize) - : owner (owner_), h (h_), s (s_), v (v_), lastHue (0.0f), edge (edgeSize) + ColourSpaceView (ColourSelector& cs, float& hue, float& sat, float& val, const int edgeSize) + : owner (cs), h (hue), s (sat), v (val), lastHue (0.0f), edge (edgeSize) { addAndMakeVisible (&marker); setMouseCursor (MouseCursor::CrosshairCursor); @@ -194,8 +194,8 @@ private: class ColourSelector::HueSelectorComp : public Component { public: - HueSelectorComp (ColourSelector& owner_, float& h_, float& s_, float& v_, const int edgeSize) - : owner (owner_), h (h_), s (s_), v (v_), edge (edgeSize) + HueSelectorComp (ColourSelector& cs, float& hue, float& sat, float& val, const int edgeSize) + : owner (cs), h (hue), s (sat), v (val), edge (edgeSize) { addAndMakeVisible (&marker); } @@ -248,8 +248,8 @@ private: class ColourSelector::SwatchComponent : public Component { public: - SwatchComponent (ColourSelector& owner_, int index_) - : owner (owner_), index (index_) + SwatchComponent (ColourSelector& cs, int itemIndex) + : owner (cs), index (itemIndex) { } @@ -306,15 +306,13 @@ private: }; //============================================================================== -ColourSelector::ColourSelector (const int flags_, - const int edgeGap_, - const int gapAroundColourSpaceComponent) +ColourSelector::ColourSelector (const int sectionsToShow, const int edge, const int gapAroundColourSpaceComponent) : colour (Colours::white), - flags (flags_), - edgeGap (edgeGap_) + flags (sectionsToShow), + edgeGap (edge) { // not much point having a selector with no components in it! - jassert ((flags_ & (showColourAtTop | showSliders | showColourspace)) != 0); + jassert ((flags & (showColourAtTop | showSliders | showColourspace)) != 0); updateHSV(); diff --git a/modules/juce_opengl/native/juce_OpenGL_android.h b/modules/juce_opengl/native/juce_OpenGL_android.h index 3681f69f6f..ec1dd41eb6 100644 --- a/modules/juce_opengl/native/juce_OpenGL_android.h +++ b/modules/juce_opengl/native/juce_OpenGL_android.h @@ -36,10 +36,10 @@ extern jobject createOpenGLView (ComponentPeer*); class OpenGLContext::NativeContext { public: - NativeContext (Component& component_, + NativeContext (Component& comp, const OpenGLPixelFormat& pixelFormat, void* /*contextToShareWith*/) - : component (component_), + : component (comp), isInsideGLCallback (false) { { diff --git a/modules/juce_opengl/native/juce_OpenGL_linux.h b/modules/juce_opengl/native/juce_OpenGL_linux.h index 5e0ada73ba..6cf0cfda60 100644 --- a/modules/juce_opengl/native/juce_OpenGL_linux.h +++ b/modules/juce_opengl/native/juce_OpenGL_linux.h @@ -32,9 +32,9 @@ class OpenGLContext::NativeContext public: NativeContext (Component& component, const OpenGLPixelFormat& pixelFormat, - void* contextToShareWith_) + void* shareContext) : renderContext (0), embeddedWindow (0), swapFrames (0), bestVisual (0), - contextToShareWith (contextToShareWith_) + contextToShareWith (shareContext) { ScopedXLock xlock; XSync (display, False); diff --git a/modules/juce_opengl/opengl/juce_Quaternion.h b/modules/juce_opengl/opengl/juce_Quaternion.h index 03e493dbc2..6912413818 100644 --- a/modules/juce_opengl/opengl/juce_Quaternion.h +++ b/modules/juce_opengl/opengl/juce_Quaternion.h @@ -39,7 +39,7 @@ class Quaternion public: Quaternion() noexcept : scalar() {} Quaternion (const Quaternion& other) noexcept : vector (other.vector), scalar (other.scalar) {} - Quaternion (const Vector3D& vector_, const Type& scalar_) noexcept : vector (vector_), scalar (scalar_) {} + Quaternion (const Vector3D& vectorPart, const Type& scalarPart) noexcept : vector (vectorPart), scalar (scalarPart) {} Quaternion (const Type& x, const Type& y, const Type& z, const Type& w) noexcept : vector (x, y, z), scalar (w) {} /** Creates a quaternion from an angle and an axis. */