mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Tightened up a few places where numeric conversion warnings could happen.
This commit is contained in:
parent
13f99df268
commit
2f1ef234ce
19 changed files with 47 additions and 47 deletions
|
|
@ -117,7 +117,7 @@ private:
|
|||
if (it != map.end())
|
||||
return it->second;
|
||||
|
||||
const Index index = newMesh.vertices.size();
|
||||
const Index index = (Index) newMesh.vertices.size();
|
||||
|
||||
if (isPositiveAndBelow (i.vertexIndex, srcMesh.vertices.size()))
|
||||
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
|
||||
{
|
||||
#if JUCE_USE_VDSP_FRAMEWORK
|
||||
vDSP_vsmul (src, 1, &multiplier, dest, 1, num);
|
||||
vDSP_vsmul (src, 1, &multiplier, dest, 1, (vDSP_Length) num);
|
||||
#else
|
||||
JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] = src[i] * multiplier, Mode::mul (mult, s),
|
||||
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
|
||||
{
|
||||
#if JUCE_USE_VDSP_FRAMEWORK
|
||||
vDSP_vsmulD (src, 1, &multiplier, dest, 1, num);
|
||||
vDSP_vsmulD (src, 1, &multiplier, dest, 1, (vDSP_Length) num);
|
||||
#else
|
||||
JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] = src[i] * multiplier, Mode::mul (mult, s),
|
||||
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
|
||||
{
|
||||
#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
|
||||
JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] += src[i], Mode::add (d, s), JUCE_LOAD_SRC_DEST, JUCE_INCREMENT_SRC_DEST, )
|
||||
#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
|
||||
{
|
||||
#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
|
||||
JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] += src[i], Mode::add (d, s), JUCE_LOAD_SRC_DEST, JUCE_INCREMENT_SRC_DEST, )
|
||||
#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
|
||||
{
|
||||
#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
|
||||
JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] -= src[i], Mode::sub (d, s), JUCE_LOAD_SRC_DEST, JUCE_INCREMENT_SRC_DEST, )
|
||||
#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
|
||||
{
|
||||
#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
|
||||
JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] -= src[i], Mode::sub (d, s), JUCE_LOAD_SRC_DEST, JUCE_INCREMENT_SRC_DEST, )
|
||||
#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
|
||||
{
|
||||
#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
|
||||
JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] *= src[i], Mode::mul (d, s), JUCE_LOAD_SRC_DEST, JUCE_INCREMENT_SRC_DEST, )
|
||||
#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
|
||||
{
|
||||
#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
|
||||
JUCE_PERFORM_VEC_OP_SRC_DEST (dest[i] *= src[i], Mode::mul (d, s), JUCE_LOAD_SRC_DEST, JUCE_INCREMENT_SRC_DEST, )
|
||||
#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
|
||||
{
|
||||
#if JUCE_USE_VDSP_FRAMEWORK
|
||||
vDSP_vsmul (dest, 1, &multiplier, dest, 1, num);
|
||||
vDSP_vsmul (dest, 1, &multiplier, dest, 1, (vDSP_Length) num);
|
||||
#else
|
||||
JUCE_PERFORM_VEC_OP_DEST (dest[i] *= multiplier, Mode::mul (d, mult), JUCE_LOAD_DEST,
|
||||
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
|
||||
{
|
||||
#if JUCE_USE_VDSP_FRAMEWORK
|
||||
vDSP_vsmulD (dest, 1, &multiplier, dest, 1, num);
|
||||
vDSP_vsmulD (dest, 1, &multiplier, dest, 1, (vDSP_Length) num);
|
||||
#else
|
||||
JUCE_PERFORM_VEC_OP_DEST (dest[i] *= multiplier, Mode::mul (d, mult), JUCE_LOAD_DEST,
|
||||
const Mode::ParallelType mult = Mode::load1 (multiplier);)
|
||||
|
|
@ -643,8 +643,8 @@ public:
|
|||
const int range = random.nextBool() ? 500 : 10;
|
||||
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
|
||||
ValueType* const data1 = buffer1;
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ bool MidiBuffer::Iterator::getNextEvent (const uint8* &midiData, int& numBytes,
|
|||
const int itemSize = MidiBufferHelpers::getEventDataSize (data);
|
||||
numBytes = itemSize;
|
||||
midiData = data + sizeof (int32) + sizeof (uint16);
|
||||
data += sizeof (int32) + sizeof (uint16) + itemSize;
|
||||
data += sizeof (int32) + sizeof (uint16) + (size_t) itemSize;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -223,7 +223,7 @@ bool MidiBuffer::Iterator::getNextEvent (MidiMessage& result, int& samplePositio
|
|||
samplePosition = MidiBufferHelpers::getEventTime (data);
|
||||
const int itemSize = MidiBufferHelpers::getEventDataSize (data);
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ MidiMessage::MidiMessage (const MidiMessage& other)
|
|||
{
|
||||
if (other.allocatedData != nullptr)
|
||||
{
|
||||
allocatedData.malloc (size);
|
||||
allocatedData.malloc ((size_t) size);
|
||||
memcpy (allocatedData, other.allocatedData, (size_t) size);
|
||||
}
|
||||
else
|
||||
|
|
@ -143,7 +143,7 @@ MidiMessage::MidiMessage (const MidiMessage& other, const double newTimeStamp)
|
|||
{
|
||||
if (other.allocatedData != nullptr)
|
||||
{
|
||||
allocatedData.malloc (size);
|
||||
allocatedData.malloc ((size_t) size);
|
||||
memcpy (allocatedData, other.allocatedData, (size_t) size);
|
||||
}
|
||||
else
|
||||
|
|
@ -255,7 +255,7 @@ MidiMessage& MidiMessage::operator= (const MidiMessage& other)
|
|||
|
||||
if (other.allocatedData != nullptr)
|
||||
{
|
||||
allocatedData.malloc (size);
|
||||
allocatedData.malloc ((size_t) size);
|
||||
memcpy (allocatedData, other.allocatedData, (size_t) size);
|
||||
}
|
||||
else
|
||||
|
|
@ -297,7 +297,7 @@ uint8* MidiMessage::allocateSpace (int bytes)
|
|||
{
|
||||
if (bytes > 4)
|
||||
{
|
||||
allocatedData.malloc (bytes);
|
||||
allocatedData.malloc ((size_t) bytes);
|
||||
return allocatedData;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -233,7 +233,7 @@ public:
|
|||
size = sizeof (nameNSString);
|
||||
|
||||
pa.mSelector = kAudioObjectPropertyElementName;
|
||||
pa.mElement = chanNum + 1;
|
||||
pa.mElement = (AudioObjectPropertyElement) chanNum + 1;
|
||||
|
||||
if (AudioObjectGetPropertyData (deviceID, &pa, 0, nullptr, &size, &nameNSString) == noErr)
|
||||
{
|
||||
|
|
@ -394,7 +394,7 @@ public:
|
|||
if (OK (AudioObjectGetPropertyData (deviceID, &pa, 0, nullptr, &size, &sr)))
|
||||
sampleRate = sr;
|
||||
|
||||
UInt32 framesPerBuf = bufferSize;
|
||||
UInt32 framesPerBuf = (UInt32) bufferSize;
|
||||
size = sizeof (framesPerBuf);
|
||||
pa.mSelector = kAudioDevicePropertyBufferFrameSize;
|
||||
AudioObjectGetPropertyData (deviceID, &pa, 0, nullptr, &size, &framesPerBuf);
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ void AudioFormatReader::read (AudioSampleBuffer* buffer,
|
|||
}
|
||||
else
|
||||
{
|
||||
HeapBlock<int*> chans (numTargetChannels);
|
||||
HeapBlock<int*> chans ((size_t) numTargetChannels);
|
||||
readChannels (*this, chans, buffer, startSample, numSamples, readerStartSample, numTargetChannels);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public:
|
|||
const ScopedLockType lock (other.getLock());
|
||||
numUsed = other.size();
|
||||
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;)
|
||||
if (ObjectClass* o = data.elements[i])
|
||||
|
|
|
|||
|
|
@ -843,7 +843,7 @@ struct JavascriptEngine::RootObject : public DynamicObject
|
|||
String::CharPointerType end (p);
|
||||
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;
|
||||
JUCE_JS_KEYWORDS (JUCE_JS_COMPARE_KEYWORD)
|
||||
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ MemoryInputStream::~MemoryInputStream()
|
|||
|
||||
int64 MemoryInputStream::getTotalLength()
|
||||
{
|
||||
return dataSize;
|
||||
return (int64) dataSize;
|
||||
}
|
||||
|
||||
int MemoryInputStream::read (void* const buffer, const int howMany)
|
||||
|
|
@ -89,7 +89,7 @@ bool MemoryInputStream::setPosition (const int64 pos)
|
|||
|
||||
int64 MemoryInputStream::getPosition()
|
||||
{
|
||||
return position;
|
||||
return (int64) position;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ public:
|
|||
void flush();
|
||||
|
||||
bool write (const void*, size_t) override;
|
||||
int64 getPosition() override { return position; }
|
||||
int64 getPosition() override { return (int64) position; }
|
||||
bool setPosition (int64) override;
|
||||
int writeFromInputStream (InputStream&, int64 maxNumBytesToWrite) override;
|
||||
bool writeRepeatedByte (uint8 byte, size_t numTimesToRepeat) override;
|
||||
|
|
|
|||
|
|
@ -558,7 +558,7 @@ struct HashGenerator
|
|||
Type result = Type();
|
||||
|
||||
while (! t.isEmpty())
|
||||
result = multiplier * result + t.getAndAdvance();
|
||||
result = ((Type) multiplier) * result + (Type) t.getAndAdvance();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ public:
|
|||
char buffer [30];
|
||||
|
||||
if (inputStream != nullptr
|
||||
&& inputStream->setPosition (zei.streamOffset)
|
||||
&& inputStream->setPosition ((int64) zei.streamOffset)
|
||||
&& inputStream->read (buffer, 30) == 30
|
||||
&& ByteOrder::littleEndianInt (buffer) == 0x04034b50)
|
||||
{
|
||||
|
|
@ -154,7 +154,7 @@ public:
|
|||
|
||||
int64 getTotalLength()
|
||||
{
|
||||
return zipEntryHolder.compressedSize;
|
||||
return (int64) zipEntryHolder.compressedSize;
|
||||
}
|
||||
|
||||
int read (void* buffer, int howMany)
|
||||
|
|
@ -162,7 +162,7 @@ public:
|
|||
if (headerSize <= 0)
|
||||
return 0;
|
||||
|
||||
howMany = (int) jmin ((int64) howMany, (int64) (zipEntryHolder.compressedSize - pos));
|
||||
howMany = (int) jmin ((int64) howMany, ((int64) zipEntryHolder.compressedSize) - pos);
|
||||
|
||||
if (inputStream == nullptr)
|
||||
return 0;
|
||||
|
|
@ -172,12 +172,12 @@ public:
|
|||
if (inputStream == file.inputStream)
|
||||
{
|
||||
const ScopedLock sl (file.lock);
|
||||
inputStream->setPosition (pos + zipEntryHolder.streamOffset + headerSize);
|
||||
inputStream->setPosition (pos + (int64) zipEntryHolder.streamOffset + headerSize);
|
||||
num = inputStream->read (buffer, howMany);
|
||||
}
|
||||
else
|
||||
{
|
||||
inputStream->setPosition (pos + zipEntryHolder.streamOffset + headerSize);
|
||||
inputStream->setPosition (pos + (int64) zipEntryHolder.streamOffset + headerSize);
|
||||
num = inputStream->read (buffer, howMany);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -487,8 +487,8 @@ private:
|
|||
bool canBePartOfMultipleClickWith (const RecentMouseDown& other, const int maxTimeBetweenMs) const
|
||||
{
|
||||
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
|
||||
&& peerID == other.peerID;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1013,7 +1013,7 @@ public:
|
|||
static Point<float> getMousePos (NSEvent* e, NSView* view)
|
||||
{
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ Point<float> MouseInputSource::getCurrentRawMousePosition()
|
|||
JUCE_AUTORELEASEPOOL
|
||||
{
|
||||
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)
|
||||
{
|
||||
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 minPosDistance = std::abs (getLinearSliderPos (valueMin.getValue()) - 0.1f - mousePos);
|
||||
|
|
@ -689,10 +689,10 @@ public:
|
|||
//==============================================================================
|
||||
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);
|
||||
while (angle < 0.0)
|
||||
|
|
@ -736,7 +736,7 @@ public:
|
|||
|
||||
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;
|
||||
|
||||
if (style == RotaryHorizontalDrag
|
||||
|
|
@ -781,7 +781,7 @@ public:
|
|||
void handleVelocityDrag (const MouseEvent& e)
|
||||
{
|
||||
const float mouseDiff = style == RotaryHorizontalVerticalDrag
|
||||
? (e.x - mousePosWhenLastDragged.x) + (mousePosWhenLastDragged.y - e.y)
|
||||
? (e.position.x - mousePosWhenLastDragged.x) + (mousePosWhenLastDragged.y - e.position.y)
|
||||
: (isHorizontal()
|
||||
|| style == RotaryHorizontalDrag
|
||||
|| (style == IncDecButtons && incDecDragDirectionIsHorizontal()))
|
||||
|
|
@ -789,7 +789,7 @@ public:
|
|||
: e.position.y - mousePosWhenLastDragged.y;
|
||||
|
||||
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)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -381,7 +381,7 @@ struct ColourEditorComp : public Component,
|
|||
|
||||
Colour getColour() const
|
||||
{
|
||||
return Colour ((int) parseInt (editor.value.getStringValue (false)));
|
||||
return Colour ((uint32) parseInt (editor.value.getStringValue (false)));
|
||||
}
|
||||
|
||||
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 (float& v, const String& s) { v = (float) parseDouble (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>
|
||||
inline String getAsString (const Type& v, bool) { return String (v); }
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ struct CachedImageList : public ReferenceCountedObject,
|
|||
CachedImage (CachedImageList& list, ImagePixelData* im)
|
||||
: owner (list), pixelData (im),
|
||||
lastUsed (Time::getCurrentTime()),
|
||||
imageSize (im->width * im->height)
|
||||
imageSize ((size_t) (im->width * im->height))
|
||||
{
|
||||
pixelData->listeners.add (&owner);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue