1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Tidied up some minor compile warnings.

This commit is contained in:
Julian Storer 2010-04-23 13:07:17 +01:00
parent 27506c2120
commit db657c04cd
32 changed files with 118 additions and 118 deletions

View file

@ -240,7 +240,7 @@ private:
{
}
void setState (const bool newState)
void setState (bool newState)
{
document.perform (new ButtonCallbackChangeAction (component, *document.getComponentLayout(), newState),
T("Change button callback"));
@ -339,7 +339,7 @@ private:
{
}
void setState (const bool newState)
void setState (bool newState)
{
document.perform (new ButtonConnectedChangeAction (component, *document.getComponentLayout(), flag, newState),
T("Change button connected edges"));

View file

@ -193,7 +193,7 @@ private:
}
//==============================================================================
void setState (const bool newState)
void setState (bool newState)
{
document.perform (new ComboEditableChangeAction (component, *document.getComponentLayout(), newState),
T("Change combo box editability"));

View file

@ -323,7 +323,7 @@ public:
}
//==============================================================================
void setState (const bool newState)
void setState (bool newState)
{
setImageKeepProportions (layout, component, newState, true);
}
@ -405,7 +405,7 @@ public:
}
//==============================================================================
void setValue (const double newValue)
void setValue (double newValue)
{
setImageOpacity (layout, owner, role, (float) newValue, true);
}

View file

@ -265,7 +265,7 @@ private:
choices.add (T("edit on double-click"));
}
void setIndex (const int newIndex)
void setIndex (int newIndex)
{
document.perform (new LabelEditableChangeAction (component, *document.getComponentLayout(), newIndex),
T("Change Label editability"));
@ -325,7 +325,7 @@ private:
choices.add (T("loss of focus commits changes"));
}
void setIndex (const int newIndex)
void setIndex (int newIndex)
{
document.perform (new LabelFocusLossChangeAction (component, *document.getComponentLayout(), newIndex == 0),
T("Change Label focus behaviour"));
@ -522,7 +522,7 @@ private:
document.removeChangeListener (this);
}
void setValue (const double newValue)
void setValue (double newValue)
{
document.getUndoManager().undoCurrentTransactionOnly();
@ -598,7 +598,7 @@ private:
document.removeChangeListener (this);
}
void setIndex (const int newIndex)
void setIndex (int newIndex)
{
Font f (label->getFont());

View file

@ -201,7 +201,7 @@ private:
choices.add ("Three Value Vertical");
}
void setIndex (const int newIndex)
void setIndex (int newIndex)
{
const Slider::SliderStyle types[] = { Slider::LinearHorizontal,
Slider::LinearVertical,
@ -288,7 +288,7 @@ private:
choices.add ("Text box below");
}
void setIndex (const int newIndex)
void setIndex (int newIndex)
{
const Slider::TextEntryBoxPosition types[] = { Slider::NoTextBox,
Slider::TextBoxLeft,
@ -364,7 +364,7 @@ private:
{
}
void setState (const bool newState)
void setState (bool newState)
{
document.perform (new SliderEditableChangeAction (component, *document.getComponentLayout(), newState),
T("Change Slider editability"));

View file

@ -455,7 +455,7 @@ private:
choices.add (T("Tabs at right"));
}
void setIndex (const int newIndex)
void setIndex (int newIndex)
{
const TabbedButtonBar::Orientation orientations[] = { TabbedButtonBar::TabsAtTop,
TabbedButtonBar::TabsAtBottom,
@ -528,7 +528,7 @@ private:
choices.add (T("Tab ") + String (i) + T(": \"") + comp->getTabNames() [i] + T("\""));
}
void setIndex (const int newIndex)
void setIndex (int newIndex)
{
document.perform (new InitialTabChangeAction (component, *document.getComponentLayout(), newIndex),
T("Change initial tab"));
@ -589,7 +589,7 @@ private:
document.removeChangeListener (this);
}
void setValue (const double newValue)
void setValue (double newValue)
{
document.getUndoManager().undoCurrentTransactionOnly();
@ -921,7 +921,7 @@ private:
choices.add (T("Named content component"));
}
void setIndex (const int newIndex)
void setIndex (int newIndex)
{
document.perform (new TabContentTypeChangeAction (component, *document.getComponentLayout(), tabIndex, newIndex == 0),
T("Change tab content type"));

View file

@ -148,7 +148,7 @@ private:
}
//==============================================================================
void setIndex (const int newIndex)
void setIndex (int newIndex)
{
document.perform (new TextEditorMultilineChangeAction (component, *document.getComponentLayout(), newIndex),
T("Change TextEditor multiline mode"));
@ -202,7 +202,7 @@ private:
}
//==============================================================================
void setState (const bool newState)
void setState (bool newState)
{
document.perform (new TextEditorReadonlyChangeAction (component, *document.getComponentLayout(), ! newState),
T("Change TextEditor read-only mode"));
@ -251,7 +251,7 @@ private:
}
//==============================================================================
void setState (const bool newState)
void setState (bool newState)
{
document.perform (new TextEditorScrollbarChangeAction (component, *document.getComponentLayout(), newState),
T("Change TextEditor scrollbars"));
@ -300,7 +300,7 @@ private:
}
//==============================================================================
void setState (const bool newState)
void setState (bool newState)
{
document.perform (new TextEditorCaretChangeAction (component, *document.getComponentLayout(), newState),
T("Change TextEditor caret"));
@ -349,7 +349,7 @@ private:
}
//==============================================================================
void setState (const bool newState)
void setState (bool newState)
{
document.perform (new TextEditorPopupMenuChangeAction (component, *document.getComponentLayout(), newState),
T("Change TextEditor popup menu"));

View file

@ -108,7 +108,7 @@ private:
{
}
void setState (const bool newState)
void setState (bool newState)
{
document.perform (new ToggleStateChangeAction (component, *document.getComponentLayout(), newState),
T("Change ToggleButton state"));

View file

@ -178,7 +178,7 @@ private:
{
}
void setState (const bool newState)
void setState (bool newState)
{
document.perform (new TreeviewRootChangeAction (component, *document.getComponentLayout(), newState),
T("Change TreeView root item"));
@ -231,7 +231,7 @@ private:
choices.add (T("Items closed by default"));
}
void setIndex (const int newIndex)
void setIndex (int newIndex)
{
document.perform (new TreeviewOpennessChangeAction (component, *document.getComponentLayout(), newIndex == 0),
T("Change TreeView openness"));

View file

@ -316,7 +316,7 @@ private:
{
}
void setState (const bool newState)
void setState (bool newState)
{
document.perform (new ViewportScrollbarChangeAction (component, *document.getComponentLayout(), vertical, newState),
T("Change Viewport scrollbar"));
@ -388,7 +388,7 @@ private:
document.removeChangeListener (this);
}
void setValue (const double newValue)
void setValue (double newValue)
{
document.getUndoManager().undoCurrentTransactionOnly();
@ -452,7 +452,7 @@ private:
choices.add (T("Named content component"));
}
void setIndex (const int newIndex)
void setIndex (int newIndex)
{
document.perform (new ViewportContentTypeChangeAction (component, *document.getComponentLayout(), newIndex),
T("Change Viewport content type"));

View file

@ -259,7 +259,7 @@ public:
document.removeChangeListener (this);
}
void setState (const bool newState)
void setState (bool newState)
{
document.setStatePaintRoutineEnabled (stateMethod, newState);
}

View file

@ -204,7 +204,7 @@ Image* BinaryResources::getImageFromCache (const String& name) const
const BinaryResources::BinaryResource* const res = getResource (name);
if (res != 0 && res->data.getSize() > 0)
return ImageCache::getFromMemory (res->data.getData(), res->data.getSize());
return ImageCache::getFromMemory (res->data.getData(), (int) res->data.getSize());
return 0;
}

View file

@ -568,8 +568,8 @@ void PaintRoutine::dropImageAt (const File& f, int x, int y)
pei->setResource (resourceName, true);
const int imageW = (int) (bounds.getRight() + 1.0f);
const int imageH = (int) (bounds.getBottom() + 1.0f);
const int imageW = (int) (bounds.getRight() + 0.999f);
const int imageH = (int) (bounds.getBottom() + 0.999f);
RelativePositionedRectangle pr;
pr.rect.setX (x - imageW / 2);

View file

@ -56,7 +56,7 @@ public:
owner->getDocument()->removeChangeListener (this);
}
void setIndex (const int newIndex)
void setIndex (int newIndex)
{
JucerFillType fill (isForStroke ? owner->getStrokeType().fill
: owner->getFillType());
@ -294,7 +294,7 @@ public:
}
//==============================================================================
void setState (const bool newState) { owner->enableStroke (newState, true); }
void setState (bool newState) { owner->enableStroke (newState, true); }
bool getState() const { return owner->isStrokeEnabled(); }
void changeListenerCallback (void*) { refresh(); }
@ -320,7 +320,7 @@ public:
owner->getDocument()->removeChangeListener (this);
}
void setValue (const double newValue)
void setValue (double newValue)
{
owner->getDocument()->getUndoManager().undoCurrentTransactionOnly();
@ -359,7 +359,7 @@ public:
owner->getDocument()->removeChangeListener (this);
}
void setIndex (const int newIndex)
void setIndex (int newIndex)
{
const PathStrokeType::JointStyle joints[] = { PathStrokeType::mitered,
PathStrokeType::curved,
@ -418,7 +418,7 @@ public:
owner->getDocument()->removeChangeListener (this);
}
void setIndex (const int newIndex)
void setIndex (int newIndex)
{
const PathStrokeType::EndCapStyle ends[] = { PathStrokeType::butt,
PathStrokeType::square,
@ -566,7 +566,7 @@ public:
element->getDocument()->removeChangeListener (this);
}
void setValue (const double newValue)
void setValue (double newValue)
{
element->getDocument()->getUndoManager().undoCurrentTransactionOnly();

View file

@ -84,7 +84,7 @@ public:
virtual const String getResource() const = 0;
//==============================================================================
void setIndex (const int newIndex)
void setIndex (int newIndex)
{
if (newIndex == 0)
{

View file

@ -105,10 +105,10 @@ protected:
void checkBounds (Rectangle<int>& bounds,
const Rectangle<int>& previousBounds,
const Rectangle<int>& limits,
const bool isStretchingTop,
const bool isStretchingLeft,
const bool isStretchingBottom,
const bool isStretchingRight);
bool isStretchingTop,
bool isStretchingLeft,
bool isStretchingBottom,
bool isStretchingRight);
void applyBoundsToComponent (Component* component, const Rectangle<int>& bounds);

View file

@ -312,7 +312,7 @@ public:
Rectangle<int> r (getCurrentBounds (parentArea));
Rectangle<float> bounds (image->getBounds());
r.setSize ((int) (bounds.getWidth() + 1.0f), (int) (bounds.getHeight() + 1.0f));
r.setSize ((int) (bounds.getWidth() + 0.999f), (int) (bounds.getHeight() + 0.999f));
setCurrentBounds (r, parentArea, true);
}
@ -443,7 +443,7 @@ private:
element->getDocument()->removeChangeListener (this);
}
void setValue (const double newValue)
void setValue (double newValue)
{
element->getDocument()->getUndoManager().undoCurrentTransactionOnly();
@ -484,7 +484,7 @@ private:
element->getDocument()->removeChangeListener (this);
}
void setIndex (const int newIndex)
void setIndex (int newIndex)
{
element->setStretchMode ((StretchMode) newIndex, true);
}

View file

@ -117,7 +117,7 @@ public:
}
//==============================================================================
void setIndex (const int newIndex) { owner->setNonZeroWinding (newIndex == 0, true); }
void setIndex (int newIndex) { owner->setNonZeroWinding (newIndex == 0, true); }
int getIndex() const { return owner->isNonZeroWinding() ? 0 : 1; }
void changeListenerCallback (void*) { refresh(); }
@ -1214,7 +1214,7 @@ public:
}
//==============================================================================
void setIndex (const int newIndex)
void setIndex (int newIndex)
{
Path::Iterator::PathElementType type = Path::Iterator::startNewSubPath;
@ -1350,7 +1350,7 @@ public:
refresh();
}
void setIndex (const int newIndex)
void setIndex (int newIndex)
{
owner->setSubpathClosed (index, newIndex == 0, true);
}

View file

@ -220,7 +220,7 @@ private:
owner->getDocument()->removeChangeListener (this);
}
void setValue (const double newValue)
void setValue (double newValue)
{
owner->getDocument()->getUndoManager().undoCurrentTransactionOnly();

View file

@ -441,7 +441,7 @@ private:
element->getDocument()->removeChangeListener (this);
}
void setIndex (const int newIndex)
void setIndex (int newIndex)
{
Font f (element->getFont());
@ -486,7 +486,7 @@ private:
element->getDocument()->removeChangeListener (this);
}
void setValue (const double newValue)
void setValue (double newValue)
{
element->getDocument()->getUndoManager().undoCurrentTransactionOnly();

View file

@ -56,7 +56,7 @@ public:
//==============================================================================
juce_UseDebuggingNewOperator
void setIndex (const int newIndex);
void setIndex (int newIndex);
int getIndex() const;
};

View file

@ -67,7 +67,7 @@ public:
//==============================================================================
void setIndex (const int newIndex)
void setIndex (int newIndex)
{
const int types[] = { Justification::centred,
Justification::centredLeft,

View file

@ -67,10 +67,10 @@ public:
void checkBounds (Rectangle<int>& bounds,
const Rectangle<int>& previousBounds,
const Rectangle<int>& limits,
const bool isStretchingTop,
const bool isStretchingLeft,
const bool isStretchingBottom,
const bool isStretchingRight);
bool isStretchingTop,
bool isStretchingLeft,
bool isStretchingBottom,
bool isStretchingRight);
void applyBoundsToComponent (Component* component, const Rectangle<int>& bounds);

View file

@ -287,7 +287,7 @@ private:
choices.add (T("Keep component size fixed"));
}
void setIndex (const int newIndex) { document.setFixedSize (newIndex != 0); }
void setIndex (int newIndex) { document.setFixedSize (newIndex != 0); }
int getIndex() const { return document.isFixedSize() ? 1 : 0; }
};
};

View file

@ -202,7 +202,7 @@ public:
else if (columnId == 2)
return direction * first->originalFilename.compare (second->originalFilename);
else if (columnId == 3)
return direction * first->data.getSize() - second->data.getSize();
return direction * (int) first->data.getSize() - (int) second->data.getSize();
return 0;
}

View file

@ -53,7 +53,7 @@ public:
void paintCell (Graphics& g, int rowNumber, int columnId, int width, int height, bool rowIsSelected);
Component* refreshComponentForCell (int rowNumber, int columnId, bool isRowSelected, Component* existingComponentToUpdate);
int getColumnAutoSizeWidth (int columnId);
void sortOrderChanged (int newSortColumnId, const bool isForwards);
void sortOrderChanged (int newSortColumnId, bool isForwards);
void selectedRowsChanged (int lastRowSelected);
//==============================================================================

View file

@ -163,12 +163,12 @@ private:
return StoredSettings::getInstance()->swatchColours.size();
}
const Colour getSwatchColour (const int index) const
const Colour getSwatchColour (int index) const
{
return StoredSettings::getInstance()->swatchColours [index];
}
void setSwatchColour (const int index, const Colour& newColour) const
void setSwatchColour (int index, const Colour& newColour) const
{
StoredSettings::getInstance()->swatchColours.set (index, newColour);
}

View file

@ -45,7 +45,7 @@
it to be true or false.
*/
#ifndef JUCE_FORCE_DEBUG
//#define JUCE_FORCE_DEBUG 1
#define JUCE_FORCE_DEBUG 0
#endif
//=============================================================================
@ -59,7 +59,7 @@
@see jassert, jassertfalse, Logger
*/
#ifndef JUCE_LOG_ASSERTIONS
// #define JUCE_LOG_ASSERTIONS 1
#define JUCE_LOG_ASSERTIONS 0
#endif
//=============================================================================
@ -77,7 +77,7 @@
/** JUCE_WASAPI: Enables WASAPI audio devices (Windows Vista and above).
*/
#ifndef JUCE_WASAPI
// #define JUCE_WASAPI 1
#define JUCE_WASAPI 0
#endif
/** JUCE_DIRECTSOUND: Enables DirectSound audio (MS Windows only).
@ -93,7 +93,7 @@
/** JUCE_JACK: Enables JACK audio devices (Linux only). */
#ifndef JUCE_JACK
#define JUCE_JACK 1
#define JUCE_JACK 0
#endif
//=============================================================================
@ -148,14 +148,14 @@
reduce code size.
*/
#ifndef JUCE_USE_CDREADER
#define JUCE_USE_CDREADER 1
#define JUCE_USE_CDREADER 0
#endif
//=============================================================================
/** JUCE_USE_CAMERA: Enables web-cam support using the CameraDevice class (Mac and Windows).
*/
#if (JUCE_QUICKTIME || JUCE_WINDOWS) && ! defined (JUCE_USE_CAMERA)
// #define JUCE_USE_CAMERA 1
#define JUCE_USE_CAMERA 0
#endif
//=============================================================================
@ -164,7 +164,7 @@
often your components are being drawn.
*/
#ifndef JUCE_ENABLE_REPAINT_DEBUGGING
// #define JUCE_ENABLE_REPAINT_DEBUGGING 1
#define JUCE_ENABLE_REPAINT_DEBUGGING 0
#endif
//=============================================================================
@ -185,7 +185,7 @@
/** JUCE_USE_XRENDER: Uses XRender to allow semi-transparent windowing on Linux.
*/
#ifndef JUCE_USE_XRENDER
//#define JUCE_USE_XRENDER 1
#define JUCE_USE_XRENDER 0
#endif
/** JUCE_USE_XCURSOR: Uses XCursor to allow ARGB cursor on Linux. This is best left turned on
@ -203,7 +203,7 @@
@see VSTPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_AU
*/
#ifndef JUCE_PLUGINHOST_VST
// #define JUCE_PLUGINHOST_VST 1
#define JUCE_PLUGINHOST_VST 0
#endif
/** JUCE_PLUGINHOST_AU: Enables the AudioUnit plugin hosting classes. This is Mac-only,
@ -212,7 +212,7 @@
@see AudioUnitPluginFormat, AudioPluginFormat, AudioPluginFormatManager, JUCE_PLUGINHOST_VST
*/
#ifndef JUCE_PLUGINHOST_AU
// #define JUCE_PLUGINHOST_AU 1
#define JUCE_PLUGINHOST_AU 0
#endif
//=============================================================================
@ -220,7 +220,7 @@
This should be enabled if you're writing a console application.
*/
#ifndef JUCE_ONLY_BUILD_CORE_LIBRARY
//#define JUCE_ONLY_BUILD_CORE_LIBRARY 1
#define JUCE_ONLY_BUILD_CORE_LIBRARY 0
#endif
/** JUCE_WEB_BROWSER: This lets you disable the WebBrowserComponent class (Mac and Windows).

View file

@ -168,11 +168,11 @@
#endif
#ifndef JUCE_FORCE_DEBUG
//#define JUCE_FORCE_DEBUG 1
#define JUCE_FORCE_DEBUG 0
#endif
#ifndef JUCE_LOG_ASSERTIONS
// #define JUCE_LOG_ASSERTIONS 1
#define JUCE_LOG_ASSERTIONS 0
#endif
#ifndef JUCE_ASIO
@ -180,7 +180,7 @@
#endif
#ifndef JUCE_WASAPI
// #define JUCE_WASAPI 1
#define JUCE_WASAPI 0
#endif
#ifndef JUCE_DIRECTSOUND
@ -192,7 +192,7 @@
#endif
#ifndef JUCE_JACK
#define JUCE_JACK 1
#define JUCE_JACK 0
#endif
#if ! (defined (JUCE_QUICKTIME) || JUCE_LINUX || JUCE_IPHONE || (JUCE_WINDOWS && ! JUCE_MSVC))
@ -220,15 +220,15 @@
#endif
#ifndef JUCE_USE_CDREADER
#define JUCE_USE_CDREADER 1
#define JUCE_USE_CDREADER 0
#endif
#if (JUCE_QUICKTIME || JUCE_WINDOWS) && ! defined (JUCE_USE_CAMERA)
// #define JUCE_USE_CAMERA 1
#define JUCE_USE_CAMERA 0
#endif
#ifndef JUCE_ENABLE_REPAINT_DEBUGGING
// #define JUCE_ENABLE_REPAINT_DEBUGGING 1
#define JUCE_ENABLE_REPAINT_DEBUGGING 0
#endif
#ifndef JUCE_USE_XINERAMA
@ -240,7 +240,7 @@
#endif
#ifndef JUCE_USE_XRENDER
//#define JUCE_USE_XRENDER 1
#define JUCE_USE_XRENDER 0
#endif
#ifndef JUCE_USE_XCURSOR
@ -248,15 +248,15 @@
#endif
#ifndef JUCE_PLUGINHOST_VST
// #define JUCE_PLUGINHOST_VST 1
#define JUCE_PLUGINHOST_VST 0
#endif
#ifndef JUCE_PLUGINHOST_AU
// #define JUCE_PLUGINHOST_AU 1
#define JUCE_PLUGINHOST_AU 0
#endif
#ifndef JUCE_ONLY_BUILD_CORE_LIBRARY
//#define JUCE_ONLY_BUILD_CORE_LIBRARY 1
#define JUCE_ONLY_BUILD_CORE_LIBRARY 0
#endif
#ifndef JUCE_WEB_BROWSER
@ -10189,7 +10189,7 @@ public:
static juce_wchar* createCopy (const char* const src, const size_t numChars)
{
juce_wchar* const dest = createUninitialised (numChars);
CharacterFunctions::copy (dest, src, numChars);
CharacterFunctions::copy (dest, src, (int) numChars);
dest [numChars] = 0;
return dest;
}
@ -87586,7 +87586,7 @@ Path::Path (const Path& other)
{
if (numElements > 0)
{
data.setAllocatedSize (numElements);
data.setAllocatedSize ((int) numElements);
memcpy (data.elements, other.data.elements, numElements * sizeof (float));
}
}
@ -87595,7 +87595,7 @@ Path& Path::operator= (const Path& other)
{
if (this != &other)
{
data.ensureAllocatedSize (other.numElements);
data.ensureAllocatedSize ((int) other.numElements);
numElements = other.numElements;
pathXMin = other.pathXMin;
@ -87694,7 +87694,7 @@ void Path::startNewSubPath (const float x, const float y)
pathYMax = jmax (pathYMax, y);
}
data.ensureAllocatedSize (numElements + 3);
data.ensureAllocatedSize ((int) numElements + 3);
data.elements [numElements++] = moveMarker;
data.elements [numElements++] = x;
@ -87708,7 +87708,7 @@ void Path::lineTo (const float x, const float y)
if (numElements == 0)
startNewSubPath (0, 0);
data.ensureAllocatedSize (numElements + 3);
data.ensureAllocatedSize ((int) numElements + 3);
data.elements [numElements++] = lineMarker;
data.elements [numElements++] = x;
@ -87729,7 +87729,7 @@ void Path::quadraticTo (const float x1, const float y1,
if (numElements == 0)
startNewSubPath (0, 0);
data.ensureAllocatedSize (numElements + 5);
data.ensureAllocatedSize ((int) numElements + 5);
data.elements [numElements++] = quadMarker;
data.elements [numElements++] = x1;
@ -87754,7 +87754,7 @@ void Path::cubicTo (const float x1, const float y1,
if (numElements == 0)
startNewSubPath (0, 0);
data.ensureAllocatedSize (numElements + 7);
data.ensureAllocatedSize ((int) numElements + 7);
data.elements [numElements++] = cubicMarker;
data.elements [numElements++] = x1;
@ -87775,14 +87775,14 @@ void Path::closeSubPath()
if (numElements > 0
&& data.elements [numElements - 1] != closeSubPathMarker)
{
data.ensureAllocatedSize (numElements + 1);
data.ensureAllocatedSize ((int) numElements + 1);
data.elements [numElements++] = closeSubPathMarker;
}
}
const Point<float> Path::getCurrentPosition() const
{
int i = numElements - 1;
size_t i = numElements - 1;
if (i > 0 && data.elements[i] == closeSubPathMarker)
{
@ -87815,7 +87815,7 @@ void Path::addRectangle (const float x, const float y,
if (h < 0)
swapVariables (y1, y2);
data.ensureAllocatedSize (numElements + 13);
data.ensureAllocatedSize ((int) numElements + 13);
if (numElements == 0)
{
@ -88545,7 +88545,7 @@ const Path Path::createPathWithRoundedCorners (const float cornerRadius) const
if (cornerRadius <= 0.01f)
return *this;
int indexOfPathStart = 0, indexOfPathStartThis = 0;
size_t indexOfPathStart = 0, indexOfPathStartThis = 0;
size_t n = 0;
bool lastWasLine = false, firstWasLine = false;
Path p;

View file

@ -43,7 +43,7 @@
#define JUCE_MAJOR_VERSION 1
#define JUCE_MINOR_VERSION 51
#define JUCE_BUILDNUMBER 15
#define JUCE_BUILDNUMBER 16
#define JUCE_VERSION ((JUCE_MAJOR_VERSION << 16) + (JUCE_MINOR_VERSION << 8) + JUCE_BUILDNUMBER)
@ -189,11 +189,11 @@
#endif
#ifndef JUCE_FORCE_DEBUG
//#define JUCE_FORCE_DEBUG 1
#define JUCE_FORCE_DEBUG 0
#endif
#ifndef JUCE_LOG_ASSERTIONS
// #define JUCE_LOG_ASSERTIONS 1
#define JUCE_LOG_ASSERTIONS 0
#endif
#ifndef JUCE_ASIO
@ -201,7 +201,7 @@
#endif
#ifndef JUCE_WASAPI
// #define JUCE_WASAPI 1
#define JUCE_WASAPI 0
#endif
#ifndef JUCE_DIRECTSOUND
@ -213,7 +213,7 @@
#endif
#ifndef JUCE_JACK
#define JUCE_JACK 1
#define JUCE_JACK 0
#endif
#if ! (defined (JUCE_QUICKTIME) || JUCE_LINUX || JUCE_IPHONE || (JUCE_WINDOWS && ! JUCE_MSVC))
@ -241,15 +241,15 @@
#endif
#ifndef JUCE_USE_CDREADER
#define JUCE_USE_CDREADER 1
#define JUCE_USE_CDREADER 0
#endif
#if (JUCE_QUICKTIME || JUCE_WINDOWS) && ! defined (JUCE_USE_CAMERA)
// #define JUCE_USE_CAMERA 1
#define JUCE_USE_CAMERA 0
#endif
#ifndef JUCE_ENABLE_REPAINT_DEBUGGING
// #define JUCE_ENABLE_REPAINT_DEBUGGING 1
#define JUCE_ENABLE_REPAINT_DEBUGGING 0
#endif
#ifndef JUCE_USE_XINERAMA
@ -261,7 +261,7 @@
#endif
#ifndef JUCE_USE_XRENDER
//#define JUCE_USE_XRENDER 1
#define JUCE_USE_XRENDER 0
#endif
#ifndef JUCE_USE_XCURSOR
@ -269,15 +269,15 @@
#endif
#ifndef JUCE_PLUGINHOST_VST
// #define JUCE_PLUGINHOST_VST 1
#define JUCE_PLUGINHOST_VST 0
#endif
#ifndef JUCE_PLUGINHOST_AU
// #define JUCE_PLUGINHOST_AU 1
#define JUCE_PLUGINHOST_AU 0
#endif
#ifndef JUCE_ONLY_BUILD_CORE_LIBRARY
//#define JUCE_ONLY_BUILD_CORE_LIBRARY 1
#define JUCE_ONLY_BUILD_CORE_LIBRARY 0
#endif
#ifndef JUCE_WEB_BROWSER

View file

@ -116,7 +116,7 @@ Path::Path (const Path& other)
{
if (numElements > 0)
{
data.setAllocatedSize (numElements);
data.setAllocatedSize ((int) numElements);
memcpy (data.elements, other.data.elements, numElements * sizeof (float));
}
}
@ -125,7 +125,7 @@ Path& Path::operator= (const Path& other)
{
if (this != &other)
{
data.ensureAllocatedSize (other.numElements);
data.ensureAllocatedSize ((int) other.numElements);
numElements = other.numElements;
pathXMin = other.pathXMin;
@ -228,7 +228,7 @@ void Path::startNewSubPath (const float x, const float y)
pathYMax = jmax (pathYMax, y);
}
data.ensureAllocatedSize (numElements + 3);
data.ensureAllocatedSize ((int) numElements + 3);
data.elements [numElements++] = moveMarker;
data.elements [numElements++] = x;
@ -242,7 +242,7 @@ void Path::lineTo (const float x, const float y)
if (numElements == 0)
startNewSubPath (0, 0);
data.ensureAllocatedSize (numElements + 3);
data.ensureAllocatedSize ((int) numElements + 3);
data.elements [numElements++] = lineMarker;
data.elements [numElements++] = x;
@ -263,7 +263,7 @@ void Path::quadraticTo (const float x1, const float y1,
if (numElements == 0)
startNewSubPath (0, 0);
data.ensureAllocatedSize (numElements + 5);
data.ensureAllocatedSize ((int) numElements + 5);
data.elements [numElements++] = quadMarker;
data.elements [numElements++] = x1;
@ -288,7 +288,7 @@ void Path::cubicTo (const float x1, const float y1,
if (numElements == 0)
startNewSubPath (0, 0);
data.ensureAllocatedSize (numElements + 7);
data.ensureAllocatedSize ((int) numElements + 7);
data.elements [numElements++] = cubicMarker;
data.elements [numElements++] = x1;
@ -309,14 +309,14 @@ void Path::closeSubPath()
if (numElements > 0
&& data.elements [numElements - 1] != closeSubPathMarker)
{
data.ensureAllocatedSize (numElements + 1);
data.ensureAllocatedSize ((int) numElements + 1);
data.elements [numElements++] = closeSubPathMarker;
}
}
const Point<float> Path::getCurrentPosition() const
{
int i = numElements - 1;
size_t i = numElements - 1;
if (i > 0 && data.elements[i] == closeSubPathMarker)
{
@ -349,7 +349,7 @@ void Path::addRectangle (const float x, const float y,
if (h < 0)
swapVariables (y1, y2);
data.ensureAllocatedSize (numElements + 13);
data.ensureAllocatedSize ((int) numElements + 13);
if (numElements == 0)
{
@ -1085,7 +1085,7 @@ const Path Path::createPathWithRoundedCorners (const float cornerRadius) const
if (cornerRadius <= 0.01f)
return *this;
int indexOfPathStart = 0, indexOfPathStartThis = 0;
size_t indexOfPathStart = 0, indexOfPathStartThis = 0;
size_t n = 0;
bool lastWasLine = false, firstWasLine = false;
Path p;

View file

@ -78,7 +78,7 @@ public:
static juce_wchar* createCopy (const char* const src, const size_t numChars)
{
juce_wchar* const dest = createUninitialised (numChars);
CharacterFunctions::copy (dest, src, numChars);
CharacterFunctions::copy (dest, src, (int) numChars);
dest [numChars] = 0;
return dest;
}