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

OSC: Fixed a number of integer conversion warnings.

This commit is contained in:
Timur Doumler 2015-11-16 09:49:45 +00:00
parent 7ff68d6e76
commit 19bf0ee663
3 changed files with 21 additions and 21 deletions

View file

@ -49,7 +49,7 @@ namespace
bool writeUint64 (uint64 value)
{
return output.writeInt64BigEndian (value);
return output.writeInt64BigEndian (int64 (value));
}
bool writeFloat32 (float value)
@ -80,7 +80,7 @@ namespace
bool writeTimeTag (OSCTimeTag timeTag)
{
return output.writeInt64BigEndian (timeTag.getRawTimeTag());
return output.writeInt64BigEndian (int64 (timeTag.getRawTimeTag()));
}
bool writeAddress (const OSCAddress& address)
@ -98,11 +98,11 @@ namespace
output.writeByte (',');
if (typeList.size() > 0)
output.write (typeList.begin(), typeList.size());
output.write (typeList.begin(), (size_t) typeList.size());
output.writeByte ('\0');
size_t bytesWritten = typeList.size() + 1;
size_t bytesWritten = (size_t) typeList.size() + 1;
size_t numPaddingZeros = ~bytesWritten & 0x03;
return output.writeRepeatedByte ('\0', numPaddingZeros);
@ -163,7 +163,7 @@ namespace
//==========================================================================
bool writeBundleElement (const OSCBundle::Element& element)
{
const size_t startPos = (size_t) output.getPosition();
const int64 startPos = output.getPosition();
if (! writeInt32 (0)) // writing dummy value for element size
return false;
@ -179,11 +179,11 @@ namespace
return false;
}
const size_t endPos = (size_t) output.getPosition();
const size_t elementSize = endPos - (startPos + 4);
const int64 endPos = output.getPosition();
const int64 elementSize = endPos - (startPos + 4);
return output.setPosition (startPos)
&& writeInt32 ((int) elementSize)
&& writeInt32 ((int32) elementSize)
&& output.setPosition (endPos);
}