Minor improvements

This commit is contained in:
Andrei Alexandrescu 2018-02-28 12:05:15 +02:00 committed by GitHub
parent 7d2928b24a
commit 230a30ec9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7790,7 +7790,7 @@ if (isInputRange!S1 && isSomeChar!(ElementEncodingType!S1)
int diff = lhs - rhs;
if (!diff)
continue;
else if ((lhs | rhs) < 0x80)
if ((lhs | rhs) < 0x80)
{
auto lowL = std.ascii.toLower(lhs);
auto lowR = std.ascii.toLower(rhs);
@ -7822,7 +7822,7 @@ if (isInputRange!S1 && isSomeChar!(ElementEncodingType!S1)
// one of chars is not cased at all
return diff;
}
return r2.empty ? 0 : -1;
return -int(r2.empty);
}
///