Ignore:
Timestamp:
2019-05-28T19:24:14Z (5 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
77de449e
Parents:
af5037d (diff), bebd154 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-05-28 19:24:14)
git-committer:
GitHub <noreply@…> (2019-05-28 19:24:14)
Message:

Merge pull request #161 from le-jzr/cxxcompat2

C++ compatibility improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/cpp/include/__bits/locale/num_get.hpp

    raf5037d r52acfab  
    301301                if (size > 0)
    302302                {
    303                     int ret{};
     303                    int olderrno{errno};
     304                    errno = EOK;
     305                    char *endptr = NULL;
     306
    304307                    if constexpr (is_signed<BaseType>::value)
    305                         ret = std::hel::str_int64_t(base.buffer_, nullptr, num_base, false, &res);
    306                     else
    307                         ret = std::hel::str_uint64_t(base.buffer_, nullptr, num_base, false, &res);
    308 
    309                     if (ret != EOK)
    310                     {
     308                        res = ::strtoll(base.buffer_, &endptr, num_base);
     309                    else
     310                        res = ::strtoull(base.buffer_, &endptr, num_base);
     311
     312                    if (errno != EOK || endptr == base.buffer_)
    311313                        err |= ios_base::failbit;
    312                         v = 0;
    313                     }
    314                     else if (res > static_cast<BaseType>(numeric_limits<T>::max()))
     314
     315                    errno = olderrno;
     316
     317                    if (res > static_cast<BaseType>(numeric_limits<T>::max()))
    315318                    {
    316319                        err |= ios_base::failbit;
Note: See TracChangeset for help on using the changeset viewer.