mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Modernised a bunch of code mainly relating to character/string iteration
This commit is contained in:
parent
d346d6ef50
commit
f0ef700e46
27 changed files with 356 additions and 379 deletions
|
|
@ -1265,10 +1265,10 @@ private:
|
|||
|
||||
if (len > 2)
|
||||
{
|
||||
const float dpi = 96.0f;
|
||||
auto dpi = 96.0f;
|
||||
|
||||
const juce_wchar n1 = s [len - 2];
|
||||
const juce_wchar n2 = s [len - 1];
|
||||
auto n1 = s[len - 2];
|
||||
auto n2 = s[len - 1];
|
||||
|
||||
if (n1 == 'i' && n2 == 'n') n *= dpi;
|
||||
else if (n1 == 'm' && n2 == 'm') n *= dpi / 25.4f;
|
||||
|
|
@ -1400,7 +1400,7 @@ private:
|
|||
}
|
||||
|
||||
//==============================================================================
|
||||
static bool isIdentifierChar (const juce_wchar c)
|
||||
static bool isIdentifierChar (juce_wchar c)
|
||||
{
|
||||
return CharacterFunctions::isLetter (c) || c == '-';
|
||||
}
|
||||
|
|
@ -1446,7 +1446,7 @@ private:
|
|||
|
||||
static bool parseNextNumber (String::CharPointerType& text, String& value, const bool allowUnits)
|
||||
{
|
||||
String::CharPointerType s (text);
|
||||
auto s = text;
|
||||
|
||||
while (s.isWhitespace() || *s == ',')
|
||||
++s;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue