@@ -117,7 +117,7 @@ private: | |||||
if (it != map.end()) | if (it != map.end()) | ||||
return it->second; | return it->second; | ||||
const Index index = newMesh.vertices.size(); | |||||
const Index index = (Index) newMesh.vertices.size(); | |||||
if (isPositiveAndBelow (i.vertexIndex, srcMesh.vertices.size())) | if (isPositiveAndBelow (i.vertexIndex, srcMesh.vertices.size())) | ||||
newMesh.vertices.add (srcMesh.vertices.getReference (i.vertexIndex)); | newMesh.vertices.add (srcMesh.vertices.getReference (i.vertexIndex)); | ||||
@@ -412,7 +412,7 @@ void JUCE_CALLTYPE FloatVectorOperations::copy (double* dest, const double* src, | |||||
void JUCE_CALLTYPE FloatVectorOperations::copyWithMultiply (float* dest, const float* src, float multiplier, int num) noexcept | void JUCE_CALLTYPE FloatVectorOperations::copyWithMultiply (float* dest, const float* src, float multiplier, int num) noexcept | ||||
{ | { | ||||
#if JUCE_USE_VDSP_FRAMEWORK | #if JUCE_USE_VDSP_FRAMEWORK | ||||
vDSP_vsmul (src, 1, &multiplier, dest, 1, num); | |||||
vDSP_vsmul (src, 1, &multiplier, dest, 1, (vDSP_Length) num); | |||||
#else | #else | ||||
JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] = src[i] * multiplier, Mode::mul (mult, s), | JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] = src[i] * multiplier, Mode::mul (mult, s), | ||||
JUCE_LOAD_SRC, JUCE_INCREMENT_SRC_DEST, | JUCE_LOAD_SRC, JUCE_INCREMENT_SRC_DEST, | ||||
@@ -423,7 +423,7 @@ void JUCE_CALLTYPE FloatVectorOperations::copyWithMultiply (float* dest, const f | |||||
void JUCE_CALLTYPE FloatVectorOperations::copyWithMultiply (double* dest, const double* src, double multiplier, int num) noexcept | void JUCE_CALLTYPE FloatVectorOperations::copyWithMultiply (double* dest, const double* src, double multiplier, int num) noexcept | ||||
{ | { | ||||
#if JUCE_USE_VDSP_FRAMEWORK | #if JUCE_USE_VDSP_FRAMEWORK | ||||
vDSP_vsmulD (src, 1, &multiplier, dest, 1, num); | |||||
vDSP_vsmulD (src, 1, &multiplier, dest, 1, (vDSP_Length) num); | |||||
#else | #else | ||||
JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] = src[i] * multiplier, Mode::mul (mult, s), | JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] = src[i] * multiplier, Mode::mul (mult, s), | ||||
JUCE_LOAD_SRC, JUCE_INCREMENT_SRC_DEST, | JUCE_LOAD_SRC, JUCE_INCREMENT_SRC_DEST, | ||||
@@ -446,7 +446,7 @@ void JUCE_CALLTYPE FloatVectorOperations::add (double* dest, double amount, int | |||||
void JUCE_CALLTYPE FloatVectorOperations::add (float* dest, const float* src, int num) noexcept | void JUCE_CALLTYPE FloatVectorOperations::add (float* dest, const float* src, int num) noexcept | ||||
{ | { | ||||
#if JUCE_USE_VDSP_FRAMEWORK | #if JUCE_USE_VDSP_FRAMEWORK | ||||
vDSP_vadd (src, 1, dest, 1, dest, 1, num); | |||||
vDSP_vadd (src, 1, dest, 1, dest, 1, (vDSP_Length) num); | |||||
#else | #else | ||||
JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] += src[i], Mode::add (d, s), JUCE_LOAD_SRC_DEST, JUCE_INCREMENT_SRC_DEST, ) | JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] += src[i], Mode::add (d, s), JUCE_LOAD_SRC_DEST, JUCE_INCREMENT_SRC_DEST, ) | ||||
#endif | #endif | ||||
@@ -455,7 +455,7 @@ void JUCE_CALLTYPE FloatVectorOperations::add (float* dest, const float* src, in | |||||
void JUCE_CALLTYPE FloatVectorOperations::add (double* dest, const double* src, int num) noexcept | void JUCE_CALLTYPE FloatVectorOperations::add (double* dest, const double* src, int num) noexcept | ||||
{ | { | ||||
#if JUCE_USE_VDSP_FRAMEWORK | #if JUCE_USE_VDSP_FRAMEWORK | ||||
vDSP_vaddD (src, 1, dest, 1, dest, 1, num); | |||||
vDSP_vaddD (src, 1, dest, 1, dest, 1, (vDSP_Length) num); | |||||
#else | #else | ||||
JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] += src[i], Mode::add (d, s), JUCE_LOAD_SRC_DEST, JUCE_INCREMENT_SRC_DEST, ) | JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] += src[i], Mode::add (d, s), JUCE_LOAD_SRC_DEST, JUCE_INCREMENT_SRC_DEST, ) | ||||
#endif | #endif | ||||
@@ -464,7 +464,7 @@ void JUCE_CALLTYPE FloatVectorOperations::add (double* dest, const double* src, | |||||
void JUCE_CALLTYPE FloatVectorOperations::subtract (float* dest, const float* src, int num) noexcept | void JUCE_CALLTYPE FloatVectorOperations::subtract (float* dest, const float* src, int num) noexcept | ||||
{ | { | ||||
#if JUCE_USE_VDSP_FRAMEWORK | #if JUCE_USE_VDSP_FRAMEWORK | ||||
vDSP_vsub (src, 1, dest, 1, dest, 1, num); | |||||
vDSP_vsub (src, 1, dest, 1, dest, 1, (vDSP_Length) num); | |||||
#else | #else | ||||
JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] -= src[i], Mode::sub (d, s), JUCE_LOAD_SRC_DEST, JUCE_INCREMENT_SRC_DEST, ) | JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] -= src[i], Mode::sub (d, s), JUCE_LOAD_SRC_DEST, JUCE_INCREMENT_SRC_DEST, ) | ||||
#endif | #endif | ||||
@@ -473,7 +473,7 @@ void JUCE_CALLTYPE FloatVectorOperations::subtract (float* dest, const float* sr | |||||
void JUCE_CALLTYPE FloatVectorOperations::subtract (double* dest, const double* src, int num) noexcept | void JUCE_CALLTYPE FloatVectorOperations::subtract (double* dest, const double* src, int num) noexcept | ||||
{ | { | ||||
#if JUCE_USE_VDSP_FRAMEWORK | #if JUCE_USE_VDSP_FRAMEWORK | ||||
vDSP_vsubD (src, 1, dest, 1, dest, 1, num); | |||||
vDSP_vsubD (src, 1, dest, 1, dest, 1, (vDSP_Length) num); | |||||
#else | #else | ||||
JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] -= src[i], Mode::sub (d, s), JUCE_LOAD_SRC_DEST, JUCE_INCREMENT_SRC_DEST, ) | JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] -= src[i], Mode::sub (d, s), JUCE_LOAD_SRC_DEST, JUCE_INCREMENT_SRC_DEST, ) | ||||
#endif | #endif | ||||
@@ -496,7 +496,7 @@ void JUCE_CALLTYPE FloatVectorOperations::addWithMultiply (double* dest, const d | |||||
void JUCE_CALLTYPE FloatVectorOperations::multiply (float* dest, const float* src, int num) noexcept | void JUCE_CALLTYPE FloatVectorOperations::multiply (float* dest, const float* src, int num) noexcept | ||||
{ | { | ||||
#if JUCE_USE_VDSP_FRAMEWORK | #if JUCE_USE_VDSP_FRAMEWORK | ||||
vDSP_vmul (src, 1, dest, 1, dest, 1, num); | |||||
vDSP_vmul (src, 1, dest, 1, dest, 1, (vDSP_Length) num); | |||||
#else | #else | ||||
JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] *= src[i], Mode::mul (d, s), JUCE_LOAD_SRC_DEST, JUCE_INCREMENT_SRC_DEST, ) | JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] *= src[i], Mode::mul (d, s), JUCE_LOAD_SRC_DEST, JUCE_INCREMENT_SRC_DEST, ) | ||||
#endif | #endif | ||||
@@ -505,7 +505,7 @@ void JUCE_CALLTYPE FloatVectorOperations::multiply (float* dest, const float* sr | |||||
void JUCE_CALLTYPE FloatVectorOperations::multiply (double* dest, const double* src, int num) noexcept | void JUCE_CALLTYPE FloatVectorOperations::multiply (double* dest, const double* src, int num) noexcept | ||||
{ | { | ||||
#if JUCE_USE_VDSP_FRAMEWORK | #if JUCE_USE_VDSP_FRAMEWORK | ||||
vDSP_vmulD (src, 1, dest, 1, dest, 1, num); | |||||
vDSP_vmulD (src, 1, dest, 1, dest, 1, (vDSP_Length) num); | |||||
#else | #else | ||||
JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] *= src[i], Mode::mul (d, s), JUCE_LOAD_SRC_DEST, JUCE_INCREMENT_SRC_DEST, ) | JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] *= src[i], Mode::mul (d, s), JUCE_LOAD_SRC_DEST, JUCE_INCREMENT_SRC_DEST, ) | ||||
#endif | #endif | ||||
@@ -514,7 +514,7 @@ void JUCE_CALLTYPE FloatVectorOperations::multiply (double* dest, const double* | |||||
void JUCE_CALLTYPE FloatVectorOperations::multiply (float* dest, float multiplier, int num) noexcept | void JUCE_CALLTYPE FloatVectorOperations::multiply (float* dest, float multiplier, int num) noexcept | ||||
{ | { | ||||
#if JUCE_USE_VDSP_FRAMEWORK | #if JUCE_USE_VDSP_FRAMEWORK | ||||
vDSP_vsmul (dest, 1, &multiplier, dest, 1, num); | |||||
vDSP_vsmul (dest, 1, &multiplier, dest, 1, (vDSP_Length) num); | |||||
#else | #else | ||||
JUCE_PERFORM_VEC_OP_DEST (dest[i] *= multiplier, Mode::mul (d, mult), JUCE_LOAD_DEST, | JUCE_PERFORM_VEC_OP_DEST (dest[i] *= multiplier, Mode::mul (d, mult), JUCE_LOAD_DEST, | ||||
const Mode::ParallelType mult = Mode::load1 (multiplier);) | const Mode::ParallelType mult = Mode::load1 (multiplier);) | ||||
@@ -524,7 +524,7 @@ void JUCE_CALLTYPE FloatVectorOperations::multiply (float* dest, float multiplie | |||||
void JUCE_CALLTYPE FloatVectorOperations::multiply (double* dest, double multiplier, int num) noexcept | void JUCE_CALLTYPE FloatVectorOperations::multiply (double* dest, double multiplier, int num) noexcept | ||||
{ | { | ||||
#if JUCE_USE_VDSP_FRAMEWORK | #if JUCE_USE_VDSP_FRAMEWORK | ||||
vDSP_vsmulD (dest, 1, &multiplier, dest, 1, num); | |||||
vDSP_vsmulD (dest, 1, &multiplier, dest, 1, (vDSP_Length) num); | |||||
#else | #else | ||||
JUCE_PERFORM_VEC_OP_DEST (dest[i] *= multiplier, Mode::mul (d, mult), JUCE_LOAD_DEST, | JUCE_PERFORM_VEC_OP_DEST (dest[i] *= multiplier, Mode::mul (d, mult), JUCE_LOAD_DEST, | ||||
const Mode::ParallelType mult = Mode::load1 (multiplier);) | const Mode::ParallelType mult = Mode::load1 (multiplier);) | ||||
@@ -643,8 +643,8 @@ public: | |||||
const int range = random.nextBool() ? 500 : 10; | const int range = random.nextBool() ? 500 : 10; | ||||
const int num = random.nextInt (range) + 1; | const int num = random.nextInt (range) + 1; | ||||
HeapBlock<ValueType> buffer1 (num + 16), buffer2 (num + 16); | |||||
HeapBlock<int> buffer3 (num + 16); | |||||
HeapBlock<ValueType> buffer1 ((size_t) num + 16), buffer2 ((size_t) num + 16); | |||||
HeapBlock<int> buffer3 ((size_t) num + 16); | |||||
#if JUCE_ARM | #if JUCE_ARM | ||||
ValueType* const data1 = buffer1; | ValueType* const data1 = buffer1; | ||||
@@ -210,7 +210,7 @@ bool MidiBuffer::Iterator::getNextEvent (const uint8* &midiData, int& numBytes, | |||||
const int itemSize = MidiBufferHelpers::getEventDataSize (data); | const int itemSize = MidiBufferHelpers::getEventDataSize (data); | ||||
numBytes = itemSize; | numBytes = itemSize; | ||||
midiData = data + sizeof (int32) + sizeof (uint16); | midiData = data + sizeof (int32) + sizeof (uint16); | ||||
data += sizeof (int32) + sizeof (uint16) + itemSize; | |||||
data += sizeof (int32) + sizeof (uint16) + (size_t) itemSize; | |||||
return true; | return true; | ||||
} | } | ||||
@@ -223,7 +223,7 @@ bool MidiBuffer::Iterator::getNextEvent (MidiMessage& result, int& samplePositio | |||||
samplePosition = MidiBufferHelpers::getEventTime (data); | samplePosition = MidiBufferHelpers::getEventTime (data); | ||||
const int itemSize = MidiBufferHelpers::getEventDataSize (data); | const int itemSize = MidiBufferHelpers::getEventDataSize (data); | ||||
result = MidiMessage (data + sizeof (int32) + sizeof (uint16), itemSize, samplePosition); | result = MidiMessage (data + sizeof (int32) + sizeof (uint16), itemSize, samplePosition); | ||||
data += sizeof (int32) + sizeof (uint16) + itemSize; | |||||
data += sizeof (int32) + sizeof (uint16) + (size_t) itemSize; | |||||
return true; | return true; | ||||
} | } |
@@ -129,7 +129,7 @@ MidiMessage::MidiMessage (const MidiMessage& other) | |||||
{ | { | ||||
if (other.allocatedData != nullptr) | if (other.allocatedData != nullptr) | ||||
{ | { | ||||
allocatedData.malloc (size); | |||||
allocatedData.malloc ((size_t) size); | |||||
memcpy (allocatedData, other.allocatedData, (size_t) size); | memcpy (allocatedData, other.allocatedData, (size_t) size); | ||||
} | } | ||||
else | else | ||||
@@ -143,7 +143,7 @@ MidiMessage::MidiMessage (const MidiMessage& other, const double newTimeStamp) | |||||
{ | { | ||||
if (other.allocatedData != nullptr) | if (other.allocatedData != nullptr) | ||||
{ | { | ||||
allocatedData.malloc (size); | |||||
allocatedData.malloc ((size_t) size); | |||||
memcpy (allocatedData, other.allocatedData, (size_t) size); | memcpy (allocatedData, other.allocatedData, (size_t) size); | ||||
} | } | ||||
else | else | ||||
@@ -255,7 +255,7 @@ MidiMessage& MidiMessage::operator= (const MidiMessage& other) | |||||
if (other.allocatedData != nullptr) | if (other.allocatedData != nullptr) | ||||
{ | { | ||||
allocatedData.malloc (size); | |||||
allocatedData.malloc ((size_t) size); | |||||
memcpy (allocatedData, other.allocatedData, (size_t) size); | memcpy (allocatedData, other.allocatedData, (size_t) size); | ||||
} | } | ||||
else | else | ||||
@@ -297,7 +297,7 @@ uint8* MidiMessage::allocateSpace (int bytes) | |||||
{ | { | ||||
if (bytes > 4) | if (bytes > 4) | ||||
{ | { | ||||
allocatedData.malloc (bytes); | |||||
allocatedData.malloc ((size_t) bytes); | |||||
return allocatedData; | return allocatedData; | ||||
} | } | ||||
@@ -233,7 +233,7 @@ public: | |||||
size = sizeof (nameNSString); | size = sizeof (nameNSString); | ||||
pa.mSelector = kAudioObjectPropertyElementName; | pa.mSelector = kAudioObjectPropertyElementName; | ||||
pa.mElement = chanNum + 1; | |||||
pa.mElement = (AudioObjectPropertyElement) chanNum + 1; | |||||
if (AudioObjectGetPropertyData (deviceID, &pa, 0, nullptr, &size, &nameNSString) == noErr) | if (AudioObjectGetPropertyData (deviceID, &pa, 0, nullptr, &size, &nameNSString) == noErr) | ||||
{ | { | ||||
@@ -394,7 +394,7 @@ public: | |||||
if (OK (AudioObjectGetPropertyData (deviceID, &pa, 0, nullptr, &size, &sr))) | if (OK (AudioObjectGetPropertyData (deviceID, &pa, 0, nullptr, &size, &sr))) | ||||
sampleRate = sr; | sampleRate = sr; | ||||
UInt32 framesPerBuf = bufferSize; | |||||
UInt32 framesPerBuf = (UInt32) bufferSize; | |||||
size = sizeof (framesPerBuf); | size = sizeof (framesPerBuf); | ||||
pa.mSelector = kAudioDevicePropertyBufferFrameSize; | pa.mSelector = kAudioDevicePropertyBufferFrameSize; | ||||
AudioObjectGetPropertyData (deviceID, &pa, 0, nullptr, &size, &framesPerBuf); | AudioObjectGetPropertyData (deviceID, &pa, 0, nullptr, &size, &framesPerBuf); | ||||
@@ -162,7 +162,7 @@ void AudioFormatReader::read (AudioSampleBuffer* buffer, | |||||
} | } | ||||
else | else | ||||
{ | { | ||||
HeapBlock<int*> chans (numTargetChannels); | |||||
HeapBlock<int*> chans ((size_t) numTargetChannels); | |||||
readChannels (*this, chans, buffer, startSample, numSamples, readerStartSample, numTargetChannels); | readChannels (*this, chans, buffer, startSample, numSamples, readerStartSample, numTargetChannels); | ||||
} | } | ||||
@@ -72,7 +72,7 @@ public: | |||||
const ScopedLockType lock (other.getLock()); | const ScopedLockType lock (other.getLock()); | ||||
numUsed = other.size(); | numUsed = other.size(); | ||||
data.setAllocatedSize (numUsed); | data.setAllocatedSize (numUsed); | ||||
memcpy (data.elements, other.getRawDataPointer(), numUsed * sizeof (ObjectClass*)); | |||||
memcpy (data.elements, other.getRawDataPointer(), (size_t) numUsed * sizeof (ObjectClass*)); | |||||
for (int i = numUsed; --i >= 0;) | for (int i = numUsed; --i >= 0;) | ||||
if (ObjectClass* o = data.elements[i]) | if (ObjectClass* o = data.elements[i]) | ||||
@@ -843,7 +843,7 @@ struct JavascriptEngine::RootObject : public DynamicObject | |||||
String::CharPointerType end (p); | String::CharPointerType end (p); | ||||
while (isIdentifierBody (*++end)) {} | while (isIdentifierBody (*++end)) {} | ||||
const size_t len = end - p; | |||||
const size_t len = (size_t) (end - p); | |||||
#define JUCE_JS_COMPARE_KEYWORD(name, str) if (len == sizeof (str) - 1 && matchToken (TokenTypes::name, len)) return TokenTypes::name; | #define JUCE_JS_COMPARE_KEYWORD(name, str) if (len == sizeof (str) - 1 && matchToken (TokenTypes::name, len)) return TokenTypes::name; | ||||
JUCE_JS_KEYWORDS (JUCE_JS_COMPARE_KEYWORD) | JUCE_JS_KEYWORDS (JUCE_JS_COMPARE_KEYWORD) | ||||
@@ -60,7 +60,7 @@ MemoryInputStream::~MemoryInputStream() | |||||
int64 MemoryInputStream::getTotalLength() | int64 MemoryInputStream::getTotalLength() | ||||
{ | { | ||||
return dataSize; | |||||
return (int64) dataSize; | |||||
} | } | ||||
int MemoryInputStream::read (void* const buffer, const int howMany) | int MemoryInputStream::read (void* const buffer, const int howMany) | ||||
@@ -89,7 +89,7 @@ bool MemoryInputStream::setPosition (const int64 pos) | |||||
int64 MemoryInputStream::getPosition() | int64 MemoryInputStream::getPosition() | ||||
{ | { | ||||
return position; | |||||
return (int64) position; | |||||
} | } | ||||
@@ -114,7 +114,7 @@ public: | |||||
void flush(); | void flush(); | ||||
bool write (const void*, size_t) override; | bool write (const void*, size_t) override; | ||||
int64 getPosition() override { return position; } | |||||
int64 getPosition() override { return (int64) position; } | |||||
bool setPosition (int64) override; | bool setPosition (int64) override; | ||||
int writeFromInputStream (InputStream&, int64 maxNumBytesToWrite) override; | int writeFromInputStream (InputStream&, int64 maxNumBytesToWrite) override; | ||||
bool writeRepeatedByte (uint8 byte, size_t numTimesToRepeat) override; | bool writeRepeatedByte (uint8 byte, size_t numTimesToRepeat) override; | ||||
@@ -558,7 +558,7 @@ struct HashGenerator | |||||
Type result = Type(); | Type result = Type(); | ||||
while (! t.isEmpty()) | while (! t.isEmpty()) | ||||
result = multiplier * result + t.getAndAdvance(); | |||||
result = ((Type) multiplier) * result + (Type) t.getAndAdvance(); | |||||
return result; | return result; | ||||
} | } | ||||
@@ -135,7 +135,7 @@ public: | |||||
char buffer [30]; | char buffer [30]; | ||||
if (inputStream != nullptr | if (inputStream != nullptr | ||||
&& inputStream->setPosition (zei.streamOffset) | |||||
&& inputStream->setPosition ((int64) zei.streamOffset) | |||||
&& inputStream->read (buffer, 30) == 30 | && inputStream->read (buffer, 30) == 30 | ||||
&& ByteOrder::littleEndianInt (buffer) == 0x04034b50) | && ByteOrder::littleEndianInt (buffer) == 0x04034b50) | ||||
{ | { | ||||
@@ -154,7 +154,7 @@ public: | |||||
int64 getTotalLength() | int64 getTotalLength() | ||||
{ | { | ||||
return zipEntryHolder.compressedSize; | |||||
return (int64) zipEntryHolder.compressedSize; | |||||
} | } | ||||
int read (void* buffer, int howMany) | int read (void* buffer, int howMany) | ||||
@@ -162,7 +162,7 @@ public: | |||||
if (headerSize <= 0) | if (headerSize <= 0) | ||||
return 0; | return 0; | ||||
howMany = (int) jmin ((int64) howMany, (int64) (zipEntryHolder.compressedSize - pos)); | |||||
howMany = (int) jmin ((int64) howMany, ((int64) zipEntryHolder.compressedSize) - pos); | |||||
if (inputStream == nullptr) | if (inputStream == nullptr) | ||||
return 0; | return 0; | ||||
@@ -172,12 +172,12 @@ public: | |||||
if (inputStream == file.inputStream) | if (inputStream == file.inputStream) | ||||
{ | { | ||||
const ScopedLock sl (file.lock); | const ScopedLock sl (file.lock); | ||||
inputStream->setPosition (pos + zipEntryHolder.streamOffset + headerSize); | |||||
inputStream->setPosition (pos + (int64) zipEntryHolder.streamOffset + headerSize); | |||||
num = inputStream->read (buffer, howMany); | num = inputStream->read (buffer, howMany); | ||||
} | } | ||||
else | else | ||||
{ | { | ||||
inputStream->setPosition (pos + zipEntryHolder.streamOffset + headerSize); | |||||
inputStream->setPosition (pos + (int64) zipEntryHolder.streamOffset + headerSize); | |||||
num = inputStream->read (buffer, howMany); | num = inputStream->read (buffer, howMany); | ||||
} | } | ||||
@@ -487,8 +487,8 @@ private: | |||||
bool canBePartOfMultipleClickWith (const RecentMouseDown& other, const int maxTimeBetweenMs) const | bool canBePartOfMultipleClickWith (const RecentMouseDown& other, const int maxTimeBetweenMs) const | ||||
{ | { | ||||
return time - other.time < RelativeTime::milliseconds (maxTimeBetweenMs) | return time - other.time < RelativeTime::milliseconds (maxTimeBetweenMs) | ||||
&& abs (position.x - other.position.x) < 8 | |||||
&& abs (position.y - other.position.y) < 8 | |||||
&& std::abs (position.x - other.position.x) < 8 | |||||
&& std::abs (position.y - other.position.y) < 8 | |||||
&& buttons == other.buttons | && buttons == other.buttons | ||||
&& peerID == other.peerID; | && peerID == other.peerID; | ||||
} | } | ||||
@@ -1013,7 +1013,7 @@ public: | |||||
static Point<float> getMousePos (NSEvent* e, NSView* view) | static Point<float> getMousePos (NSEvent* e, NSView* view) | ||||
{ | { | ||||
NSPoint p = [view convertPoint: [e locationInWindow] fromView: nil]; | NSPoint p = [view convertPoint: [e locationInWindow] fromView: nil]; | ||||
return Point<float> (p.x, [view frame].size.height - p.y); | |||||
return Point<float> ((float) p.x, (float) ([view frame].size.height - p.y)); | |||||
} | } | ||||
static int getModifierForButtonNumber (const NSInteger num) | static int getModifierForButtonNumber (const NSInteger num) | ||||
@@ -214,7 +214,7 @@ Point<float> MouseInputSource::getCurrentRawMousePosition() | |||||
JUCE_AUTORELEASEPOOL | JUCE_AUTORELEASEPOOL | ||||
{ | { | ||||
const NSPoint p ([NSEvent mouseLocation]); | const NSPoint p ([NSEvent mouseLocation]); | ||||
return Point<float> (p.x, getMainScreenHeight() - p.y); | |||||
return Point<float> ((float) p.x, (float) (getMainScreenHeight() - p.y)); | |||||
} | } | ||||
} | } | ||||
@@ -667,7 +667,7 @@ public: | |||||
if (isTwoValue || isThreeValue) | if (isTwoValue || isThreeValue) | ||||
{ | { | ||||
const float mousePos = (float) (isVertical() ? e.y : e.x); | |||||
const float mousePos = isVertical() ? e.position.y : e.position.x; | |||||
const float normalPosDistance = std::abs (getLinearSliderPos (currentValue.getValue()) - mousePos); | const float normalPosDistance = std::abs (getLinearSliderPos (currentValue.getValue()) - mousePos); | ||||
const float minPosDistance = std::abs (getLinearSliderPos (valueMin.getValue()) - 0.1f - mousePos); | const float minPosDistance = std::abs (getLinearSliderPos (valueMin.getValue()) - 0.1f - mousePos); | ||||
@@ -689,10 +689,10 @@ public: | |||||
//============================================================================== | //============================================================================== | ||||
void handleRotaryDrag (const MouseEvent& e) | void handleRotaryDrag (const MouseEvent& e) | ||||
{ | { | ||||
const int dx = e.x - sliderRect.getCentreX(); | |||||
const int dy = e.y - sliderRect.getCentreY(); | |||||
const float dx = e.position.x - sliderRect.getCentreX(); | |||||
const float dy = e.position.y - sliderRect.getCentreY(); | |||||
if (dx * dx + dy * dy > 25) | |||||
if (dx * dx + dy * dy > 25.0f) | |||||
{ | { | ||||
double angle = std::atan2 ((double) dx, (double) -dy); | double angle = std::atan2 ((double) dx, (double) -dy); | ||||
while (angle < 0.0) | while (angle < 0.0) | ||||
@@ -736,7 +736,7 @@ public: | |||||
void handleAbsoluteDrag (const MouseEvent& e) | void handleAbsoluteDrag (const MouseEvent& e) | ||||
{ | { | ||||
const int mousePos = (isHorizontal() || style == RotaryHorizontalDrag) ? e.x : e.y; | |||||
const float mousePos = (isHorizontal() || style == RotaryHorizontalDrag) ? e.position.x : e.position.y; | |||||
double newPos = (mousePos - sliderRegionStart) / (double) sliderRegionSize; | double newPos = (mousePos - sliderRegionStart) / (double) sliderRegionSize; | ||||
if (style == RotaryHorizontalDrag | if (style == RotaryHorizontalDrag | ||||
@@ -781,7 +781,7 @@ public: | |||||
void handleVelocityDrag (const MouseEvent& e) | void handleVelocityDrag (const MouseEvent& e) | ||||
{ | { | ||||
const float mouseDiff = style == RotaryHorizontalVerticalDrag | const float mouseDiff = style == RotaryHorizontalVerticalDrag | ||||
? (e.x - mousePosWhenLastDragged.x) + (mousePosWhenLastDragged.y - e.y) | |||||
? (e.position.x - mousePosWhenLastDragged.x) + (mousePosWhenLastDragged.y - e.position.y) | |||||
: (isHorizontal() | : (isHorizontal() | ||||
|| style == RotaryHorizontalDrag | || style == RotaryHorizontalDrag | ||||
|| (style == IncDecButtons && incDecDragDirectionIsHorizontal())) | || (style == IncDecButtons && incDecDragDirectionIsHorizontal())) | ||||
@@ -789,7 +789,7 @@ public: | |||||
: e.position.y - mousePosWhenLastDragged.y; | : e.position.y - mousePosWhenLastDragged.y; | ||||
const double maxSpeed = jmax (200, sliderRegionSize); | const double maxSpeed = jmax (200, sliderRegionSize); | ||||
double speed = jlimit (0.0, maxSpeed, (double) abs (mouseDiff)); | |||||
double speed = jlimit (0.0, maxSpeed, (double) std::abs (mouseDiff)); | |||||
if (speed != 0) | if (speed != 0) | ||||
{ | { | ||||
@@ -381,7 +381,7 @@ struct ColourEditorComp : public Component, | |||||
Colour getColour() const | Colour getColour() const | ||||
{ | { | ||||
return Colour ((int) parseInt (editor.value.getStringValue (false))); | |||||
return Colour ((uint32) parseInt (editor.value.getStringValue (false))); | |||||
} | } | ||||
void paint (Graphics& g) override | void paint (Graphics& g) override | ||||
@@ -53,7 +53,7 @@ namespace LiveConstantEditor | |||||
inline void setFromString (double& v, const String& s) { v = parseDouble (s); } | inline void setFromString (double& v, const String& s) { v = parseDouble (s); } | ||||
inline void setFromString (float& v, const String& s) { v = (float) parseDouble (s); } | inline void setFromString (float& v, const String& s) { v = (float) parseDouble (s); } | ||||
inline void setFromString (String& v, const String& s) { v = s; } | inline void setFromString (String& v, const String& s) { v = s; } | ||||
inline void setFromString (Colour& v, const String& s) { v = Colour ((int) parseInt (s)); } | |||||
inline void setFromString (Colour& v, const String& s) { v = Colour ((uint32) parseInt (s)); } | |||||
template <typename Type> | template <typename Type> | ||||
inline String getAsString (const Type& v, bool) { return String (v); } | inline String getAsString (const Type& v, bool) { return String (v); } | ||||
@@ -90,7 +90,7 @@ struct CachedImageList : public ReferenceCountedObject, | |||||
CachedImage (CachedImageList& list, ImagePixelData* im) | CachedImage (CachedImageList& list, ImagePixelData* im) | ||||
: owner (list), pixelData (im), | : owner (list), pixelData (im), | ||||
lastUsed (Time::getCurrentTime()), | lastUsed (Time::getCurrentTime()), | ||||
imageSize (im->width * im->height) | |||||
imageSize ((size_t) (im->width * im->height)) | |||||
{ | { | ||||
pixelData->listeners.add (&owner); | pixelData->listeners.add (&owner); | ||||
} | } | ||||