mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 18:32:55 +00:00
remove redundant group separator checks in private QLocale methods
QLocalePrivate::numberToCLocale() skips whitespace (0xa0 is whitespace char) at the begining and end Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
d032103cae
commit
5070e961d0
1 changed files with 4 additions and 8 deletions
|
@ -2311,8 +2311,7 @@ float QLocalePrivate::stringToFloat(const QString &number, bool *ok,
|
|||
GroupSeparatorMode group_sep_mode) const
|
||||
{
|
||||
CharBuff buff;
|
||||
if (!numberToCLocale(group().unicode() == 0xa0 ? number.trimmed() : number,
|
||||
group_sep_mode, &buff)) {
|
||||
if (!numberToCLocale(number, group_sep_mode, &buff)) {
|
||||
if (ok != nullptr)
|
||||
*ok = false;
|
||||
return 0.0;
|
||||
|
@ -2324,8 +2323,7 @@ double QLocalePrivate::stringToDouble(const QString &number, bool *ok,
|
|||
GroupSeparatorMode group_sep_mode) const
|
||||
{
|
||||
CharBuff buff;
|
||||
if (!numberToCLocale(group().unicode() == 0xa0 ? number.trimmed() : number,
|
||||
group_sep_mode, &buff)) {
|
||||
if (!numberToCLocale(number, group_sep_mode, &buff)) {
|
||||
if (ok != nullptr)
|
||||
*ok = false;
|
||||
return 0.0;
|
||||
|
@ -2337,8 +2335,7 @@ qlonglong QLocalePrivate::stringToLongLong(const QString &number, int base,
|
|||
bool *ok, GroupSeparatorMode group_sep_mode) const
|
||||
{
|
||||
CharBuff buff;
|
||||
if (!numberToCLocale(group().unicode() == 0xa0 ? number.trimmed() : number,
|
||||
group_sep_mode, &buff)) {
|
||||
if (!numberToCLocale(number, group_sep_mode, &buff)) {
|
||||
if (ok != nullptr)
|
||||
*ok = false;
|
||||
return 0;
|
||||
|
@ -2351,8 +2348,7 @@ qulonglong QLocalePrivate::stringToUnsLongLong(const QString &number, int base,
|
|||
bool *ok, GroupSeparatorMode group_sep_mode) const
|
||||
{
|
||||
CharBuff buff;
|
||||
if (!numberToCLocale(group().unicode() == 0xa0 ? number.trimmed() : number,
|
||||
group_sep_mode, &buff)) {
|
||||
if (!numberToCLocale(number, group_sep_mode, &buff)) {
|
||||
if (ok != nullptr)
|
||||
*ok = false;
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue