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

Removed a couple of minor compiler warnings

This commit is contained in:
Julian Storer 2010-12-21 19:25:35 +00:00
parent ece4205d3d
commit 9720e2deb0
4 changed files with 12 additions and 16 deletions

View file

@ -8104,8 +8104,6 @@ int64 FileInputStream::getTotalLength()
int FileInputStream::read (void* buffer, int bytesToRead)
{
int num = 0;
if (needToSeek)
{
if (juce_fileSetPosition (fileHandle, currentPosition) < 0)
@ -8114,10 +8112,10 @@ int FileInputStream::read (void* buffer, int bytesToRead)
needToSeek = false;
}
num = readInternal (buffer, bytesToRead);
const size_t num = readInternal (buffer, bytesToRead);
currentPosition += num;
return num;
return (int) num;
}
bool FileInputStream::isExhausted()
@ -9279,7 +9277,7 @@ namespace URLHelpers
// just a short text attachment, so use simple url encoding..
headers << "Content-Type: application/x-www-form-urlencoded\r\nContent-length: "
<< postData.getSize() << "\r\n";
<< (unsigned int) postData.getSize() << "\r\n";
}
}
}
@ -9984,7 +9982,7 @@ bool MemoryOutputStream::write (const void* const buffer, int howMany)
const size_t storageNeeded = position + howMany;
if (storageNeeded >= data.getSize())
data.ensureSize ((storageNeeded + jmin (storageNeeded / 2, (size_t) (1024 * 1024)) + 32) & ~31);
data.ensureSize ((storageNeeded + jmin ((int) (storageNeeded / 2), 1024 * 1024) + 32) & ~31);
memcpy (static_cast<char*> (data.getData()) + position, buffer, howMany);
position += howMany;
@ -10042,12 +10040,12 @@ const String MemoryOutputStream::toUTF8() const
const String MemoryOutputStream::toString() const
{
return String::createStringFromData (getData(), getDataSize());
return String::createStringFromData (getData(), (int) getDataSize());
}
OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, const MemoryOutputStream& streamToRead)
{
stream.write (streamToRead.getData(), streamToRead.getDataSize());
stream.write (streamToRead.getData(), (int) streamToRead.getDataSize());
return stream;
}

View file

@ -58,8 +58,6 @@ int64 FileInputStream::getTotalLength()
int FileInputStream::read (void* buffer, int bytesToRead)
{
int num = 0;
if (needToSeek)
{
if (juce_fileSetPosition (fileHandle, currentPosition) < 0)
@ -68,10 +66,10 @@ int FileInputStream::read (void* buffer, int bytesToRead)
needToSeek = false;
}
num = readInternal (buffer, bytesToRead);
const size_t num = readInternal (buffer, bytesToRead);
currentPosition += num;
return num;
return (int) num;
}
bool FileInputStream::isExhausted()

View file

@ -179,7 +179,7 @@ namespace URLHelpers
// just a short text attachment, so use simple url encoding..
headers << "Content-Type: application/x-www-form-urlencoded\r\nContent-length: "
<< postData.getSize() << "\r\n";
<< (unsigned int) postData.getSize() << "\r\n";
}
}
}

View file

@ -78,7 +78,7 @@ bool MemoryOutputStream::write (const void* const buffer, int howMany)
const size_t storageNeeded = position + howMany;
if (storageNeeded >= data.getSize())
data.ensureSize ((storageNeeded + jmin (storageNeeded / 2, (size_t) (1024 * 1024)) + 32) & ~31);
data.ensureSize ((storageNeeded + jmin ((int) (storageNeeded / 2), 1024 * 1024) + 32) & ~31);
memcpy (static_cast<char*> (data.getData()) + position, buffer, howMany);
position += howMany;
@ -136,12 +136,12 @@ const String MemoryOutputStream::toUTF8() const
const String MemoryOutputStream::toString() const
{
return String::createStringFromData (getData(), getDataSize());
return String::createStringFromData (getData(), (int) getDataSize());
}
OutputStream& JUCE_CALLTYPE operator<< (OutputStream& stream, const MemoryOutputStream& streamToRead)
{
stream.write (streamToRead.getData(), streamToRead.getDataSize());
stream.write (streamToRead.getData(), (int) streamToRead.getDataSize());
return stream;
}