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:
parent
827e02862c
commit
8d8c946528
4 changed files with 6 additions and 6 deletions
|
|
@ -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!
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue