Changeset 955 for cpp/frams/util/sstring-simple.cpp
- Timestamp:
- 06/25/20 00:34:29 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/util/sstring-simple.cpp
r897 r955 22 22 } 23 23 24 SString::SString(int x)25 {26 initEmpty();27 if (x)28 ensureSize(x + 1);29 }30 31 24 SString::SString(const char *t, int t_len) 32 25 { … … 46 39 txt = from.txt; size = from.size; used = from.used; 47 40 from.txt = NULL; from.size = 0; from.used = 0; 41 } 42 43 SString::SString(char in) 44 { 45 initEmpty(); 46 append(&in, 1); 48 47 } 49 48 … … 117 116 SString SString::operator+(const SString& s) const 118 117 { 119 SString ret(len() + s.len()); 118 SString ret; 119 ret.reserve(len() + s.len()); 120 120 ret = *this; 121 121 ret += s;
Note: See TracChangeset
for help on using the changeset viewer.