Changeset 52acfab in mainline for uspace/lib/cpp/src/string.cpp


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/src/string.cpp

    raf5037d r52acfab  
    4242    {
    4343        char* end;
    44         long result = hel::strtol(str.c_str(), &end, base);
     44        long result = ::strtol(str.c_str(), &end, base);
    4545
    4646        if (end != str.c_str())
     
    5858    {
    5959        char* end;
    60         unsigned long result = hel::strtoul(str.c_str(), &end, base);
     60        unsigned long result = ::strtoul(str.c_str(), &end, base);
    6161
    6262        if (end != str.c_str())
     
    106106    }
    107107
    108     namespace hel
    109     {
    110         extern "C" int asprintf(char**, const char*, ...);
    111     }
    112 
    113108    string to_string(int val)
    114109    {
    115110        char* tmp;
    116         hel::asprintf(&tmp, "%d", val);
     111        ::asprintf(&tmp, "%d", val);
    117112
    118113        std::string res{tmp};
     
    125120    {
    126121        char* tmp;
    127         hel::asprintf(&tmp, "%u", val);
     122        ::asprintf(&tmp, "%u", val);
    128123
    129124        std::string res{tmp};
     
    136131    {
    137132        char* tmp;
    138         hel::asprintf(&tmp, "%ld", val);
     133        ::asprintf(&tmp, "%ld", val);
    139134
    140135        std::string res{tmp};
     
    147142    {
    148143        char* tmp;
    149         hel::asprintf(&tmp, "%lu", val);
     144        ::asprintf(&tmp, "%lu", val);
    150145
    151146        std::string res{tmp};
     
    158153    {
    159154        char* tmp;
    160         hel::asprintf(&tmp, "%lld", val);
     155        ::asprintf(&tmp, "%lld", val);
    161156
    162157        std::string res{tmp};
     
    169164    {
    170165        char* tmp;
    171         hel::asprintf(&tmp, "%llu", val);
     166        ::asprintf(&tmp, "%llu", val);
    172167
    173168        std::string res{tmp};
     
    180175    {
    181176        char* tmp;
    182         hel::asprintf(&tmp, "%f", val);
     177        ::asprintf(&tmp, "%f", val);
    183178
    184179        std::string res{tmp};
     
    191186    {
    192187        char* tmp;
    193         hel::asprintf(&tmp, "%f", val);
     188        ::asprintf(&tmp, "%f", val);
    194189
    195190        std::string res{tmp};
     
    202197    {
    203198        char* tmp;
    204         hel::asprintf(&tmp, "%Lf", val);
     199        ::asprintf(&tmp, "%Lf", val);
    205200
    206201        std::string res{tmp};
Note: See TracChangeset for help on using the changeset viewer.