1
0
Fork 0
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:
jules 2014-07-10 18:57:24 +01:00
parent 13f99df268
commit 2f1ef234ce
19 changed files with 47 additions and 47 deletions

View file

@ -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;
}