Changes in uspace/lib/cpp/src/stdexcept.cpp [0d221d2:bc56f30] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/cpp/src/stdexcept.cpp
r0d221d2 rbc56f30 31 31 #include <stdexcept> 32 32 #include <string> 33 #include <str.h> 33 34 34 35 namespace std 35 36 { 36 37 logic_error::logic_error(const string& what) 37 : what_{ hel::str_dup(what.c_str())}38 : what_{::helenos::str_dup(what.c_str())} 38 39 { /* DUMMY BODY */ } 39 40 40 41 logic_error::logic_error(const char* what) 41 : what_{ hel::str_dup(what)}42 : what_{::helenos::str_dup(what)} 42 43 { /* DUMMY BODY */ } 43 44 44 45 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_)} 46 47 { /* DUMMY BODY */ } 47 48 … … 50 51 if (what_) 51 52 free(what_); 52 what_ = hel::str_dup(other.what_);53 what_ = ::helenos::str_dup(other.what_); 53 54 54 55 return *this; … … 114 115 115 116 runtime_error::runtime_error(const string& what) 116 : what_{ hel::str_dup(what.c_str())}117 : what_{::helenos::str_dup(what.c_str())} 117 118 { /* DUMMY BODY */ } 118 119 119 120 runtime_error::runtime_error(const char* what) 120 : what_{ hel::str_dup(what)}121 : what_{::helenos::str_dup(what)} 121 122 { /* DUMMY BODY */ } 122 123 123 124 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_)} 125 126 { /* DUMMY BODY */ } 126 127 … … 129 130 if (what_) 130 131 free(what_); 131 what_ = hel::str_dup(other.what_);132 what_ = ::helenos::str_dup(other.what_); 132 133 133 134 return *this;
Note:
See TracChangeset
for help on using the changeset viewer.