Changeset 52acfab in mainline for uspace/lib/cpp/src/stdexcept.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/stdexcept.cpp

    raf5037d r52acfab  
    3131#include <stdexcept>
    3232#include <string>
     33#include <str.h>
    3334
    3435namespace std
    3536{
    3637    logic_error::logic_error(const string& what)
    37         : what_{hel::str_dup(what.c_str())}
     38        : what_{::helenos::str_dup(what.c_str())}
    3839    { /* DUMMY BODY */ }
    3940
    4041    logic_error::logic_error(const char* what)
    41         : what_{hel::str_dup(what)}
     42        : what_{::helenos::str_dup(what)}
    4243    { /* DUMMY BODY */ }
    4344
    4445    logic_error::logic_error(const logic_error& other) noexcept
    45         : exception{other}, what_{hel::str_dup(other.what_)}
     46        : exception{other}, what_{::helenos::str_dup(other.what_)}
    4647    { /* DUMMY BODY */ }
    4748
     
    5051        if (what_)
    5152            free(what_);
    52         what_ = hel::str_dup(other.what_);
     53        what_ = ::helenos::str_dup(other.what_);
    5354
    5455        return *this;
     
    114115
    115116    runtime_error::runtime_error(const string& what)
    116         : what_{hel::str_dup(what.c_str())}
     117        : what_{::helenos::str_dup(what.c_str())}
    117118    { /* DUMMY BODY */ }
    118119
    119120    runtime_error::runtime_error(const char* what)
    120         : what_{hel::str_dup(what)}
     121        : what_{::helenos::str_dup(what)}
    121122    { /* DUMMY BODY */ }
    122123
    123124    runtime_error::runtime_error(const runtime_error& other) noexcept
    124         : exception{other}, what_{hel::str_dup(other.what_)}
     125        : exception{other}, what_{::helenos::str_dup(other.what_)}
    125126    { /* DUMMY BODY */ }
    126127
     
    129130        if (what_)
    130131            free(what_);
    131         what_ = hel::str_dup(other.what_);
     132        what_ = ::helenos::str_dup(other.what_);
    132133
    133134        return *this;
Note: See TracChangeset for help on using the changeset viewer.