From 59569fb58e0f1cf2bf358a39c3467aebfaf93e1c Mon Sep 17 00:00:00 2001 From: Julian Storer Date: Tue, 23 Mar 2010 20:56:48 +0000 Subject: [PATCH] Documentation fixes. --- src/containers/juce_Array.h | 2 +- src/gui/components/mouse/juce_MouseInputSource.h | 2 +- src/text/juce_StringArray.cpp | 10 +++++++--- src/text/juce_StringArray.h | 12 ++++++++---- src/text/juce_XmlElement.h | 2 -- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/containers/juce_Array.h b/src/containers/juce_Array.h index 852fbe3eb6..b7d85a3031 100644 --- a/src/containers/juce_Array.h +++ b/src/containers/juce_Array.h @@ -47,7 +47,7 @@ you do this, the array doesn't take any ownership of the objects - see the OwnedArray class or the ReferenceCountedArray class for more powerful ways of holding lists of objects. - For holding lists of strings, you can use Array , but it's usually better to use the + For holding lists of strings, you can use Array\, but it's usually better to use the specialised class StringArray, which provides more useful functions. To make all the array's methods thread-safe, pass in "CriticalSection" as the templated diff --git a/src/gui/components/mouse/juce_MouseInputSource.h b/src/gui/components/mouse/juce_MouseInputSource.h index 63f52da02d..7028e45573 100644 --- a/src/gui/components/mouse/juce_MouseInputSource.h +++ b/src/gui/components/mouse/juce_MouseInputSource.h @@ -152,7 +152,7 @@ public: The unbounded mode is automatically turned off when the mouse button is released, or it can be turned off explicitly by calling this method again. - @param shouldUnboundedMovementBeEnabled whether to turn this mode on or off + @param isEnabled whether to turn this mode on or off @param keepCursorVisibleUntilOffscreen if set to false, the cursor will immediately be hidden; if true, it will only be hidden when it is moved beyond the edge of the screen diff --git a/src/text/juce_StringArray.cpp b/src/text/juce_StringArray.cpp index 4f032a9ec5..32c85557d4 100644 --- a/src/text/juce_StringArray.cpp +++ b/src/text/juce_StringArray.cpp @@ -452,10 +452,14 @@ void StringArray::removeDuplicates (const bool ignoreCase) void StringArray::appendNumbersToDuplicates (const bool ignoreCase, const bool appendNumberToFirstInstance, - const juce_wchar* const preNumberString, - const juce_wchar* const postNumberString) + const juce_wchar* preNumberString, + const juce_wchar* postNumberString) { - jassert (preNumberString != 0 && postNumberString != 0); // These strings can't be null pointers.. + if (preNumberString == 0) + preNumberString = T(" ("); + + if (postNumberString == 0) + postNumberString = T(")"); for (int i = 0; i < size() - 1; ++i) { diff --git a/src/text/juce_StringArray.h b/src/text/juce_StringArray.h index 24b4328384..7e1461a1e0 100644 --- a/src/text/juce_StringArray.h +++ b/src/text/juce_StringArray.h @@ -268,13 +268,17 @@ public: @param ignoreCaseWhenComparing whether the comparison used is case-insensitive @param appendNumberToFirstInstance whether the first of a group of similar strings also has a number appended to it. - @param preNumberString when adding a number, this string is added before the number - @param postNumberString this string is appended after any numbers that are added + @param preNumberString when adding a number, this string is added before the number. + If you pass 0, a default string will be used, which adds + brackets around the number. + @param postNumberString this string is appended after any numbers that are added. + If you pass 0, a default string will be used, which adds + brackets around the number. */ void appendNumbersToDuplicates (bool ignoreCaseWhenComparing, bool appendNumberToFirstInstance, - const juce_wchar* preNumberString = JUCE_T(" ("), - const juce_wchar* postNumberString = JUCE_T(")")); + const juce_wchar* preNumberString = 0, + const juce_wchar* postNumberString = 0); //============================================================================== /** Joins the strings in the array together into one string. diff --git a/src/text/juce_XmlElement.h b/src/text/juce_XmlElement.h index 1bd980ceee..a801ac50f6 100644 --- a/src/text/juce_XmlElement.h +++ b/src/text/juce_XmlElement.h @@ -294,8 +294,6 @@ public: /** Returns the value of a named attribute. @param attributeName the name of the attribute to look up - @param defaultReturnValue a value to return if the element doesn't have an attribute - with this name */ const String& getStringAttribute (const String& attributeName) const throw();