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

Changed some types from int to size_t where appropriate. Fixed a CoreMidi build problem in 64-bit mode.

This commit is contained in:
jules 2013-02-24 15:49:06 +00:00
parent f507bb8a48
commit bfd9350bed
46 changed files with 155 additions and 151 deletions

View file

@ -30,11 +30,11 @@
//==============================================================================
namespace FileHelpers
{
static int64 calculateMemoryHashCode (const void* data, const int numBytes)
static int64 calculateMemoryHashCode (const void* data, const size_t numBytes)
{
int64 t = 0;
for (int i = 0; i < numBytes; ++i)
for (size_t i = 0; i < numBytes; ++i)
t = t * 65599 + static_cast <const uint8*> (data)[i];
return t;
@ -68,7 +68,7 @@ namespace FileHelpers
return stream != nullptr ? calculateStreamHashCode (*stream) : 0;
}
bool overwriteFileWithNewDataIfDifferent (const File& file, const void* data, int numBytes)
bool overwriteFileWithNewDataIfDifferent (const File& file, const void* data, size_t numBytes)
{
if (file.getSize() == numBytes
&& calculateMemoryHashCode (data, numBytes) == calculateFileHashCode (file))