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

Tidied up some inconsistent use of size_t and a problem in a demo build.

This commit is contained in:
jules 2015-02-06 08:59:20 +00:00
parent 827e02862c
commit 8d8c946528
4 changed files with 6 additions and 6 deletions

View file

@ -81,7 +81,7 @@ private:
//=======================================================================
void prepareSynthesiserState (double sampleRate, double frequencyInHz)
{
std::size_t delayLineLength = std::lround (sampleRate / frequencyInHz);
size_t delayLineLength = (size_t) roundToInt (sampleRate / frequencyInHz);
// we need a minimum delay line length to get a reasonable synthesis.
// if you hit this assert, increase sample rate or decrease frequency!

View file

@ -2163,7 +2163,7 @@ private:
if (object->getState (&stream) == kResultTrue)
{
MemoryBlock info (stream.getData(), (std::size_t) stream.getSize());
MemoryBlock info (stream.getData(), (size_t) stream.getSize());
head.createNewChildElement (identifier)->addTextElement (info.toBase64Encoding());
}
}

View file

@ -566,9 +566,9 @@ struct HashGenerator
enum { multiplier = sizeof (Type) > 4 ? 101 : 31 };
};
int String::hashCode() const noexcept { return HashGenerator<int> ::calculate (text); }
int64 String::hashCode64() const noexcept { return HashGenerator<int64> ::calculate (text); }
std::size_t String::hash() const noexcept { return HashGenerator<std::size_t>::calculate (text); }
int String::hashCode() const noexcept { return HashGenerator<int> ::calculate (text); }
int64 String::hashCode64() const noexcept { return HashGenerator<int64> ::calculate (text); }
size_t String::hash() const noexcept { return HashGenerator<size_t> ::calculate (text); }
//==============================================================================
JUCE_API bool JUCE_CALLTYPE operator== (const String& s1, const String& s2) noexcept { return s1.compare (s2) == 0; }

View file

@ -181,7 +181,7 @@ public:
int64 hashCode64() const noexcept;
/** Generates a probably-unique hashcode from this string. */
std::size_t hash() const noexcept;
size_t hash() const noexcept;
/** Returns the number of characters in the string. */
int length() const noexcept;