| 1216 | } |
| 1217 | |
| 1218 | void basic_string::moveAssign(basic_string&& other) FL_NOEXCEPT { |
| 1219 | if (this == &other) return; |
| 1220 | if (other.isInline()) { |
| 1221 | mLength = other.mLength; |
| 1222 | mStorage.reset(); |
| 1223 | fl::memcpy(inlineBufferPtr(), other.inlineBufferPtr(), other.mLength + 1); |
| 1224 | } else { |
| 1225 | mLength = other.mLength; |
| 1226 | mStorage = fl::move(other.mStorage); |
| 1227 | } |
| 1228 | other.mLength = 0; |
| 1229 | other.mStorage.reset(); |
| 1230 | other.inlineBufferPtr()[0] = '\0'; |
| 1231 | } |
| 1232 | |
| 1233 | void basic_string::swapWith(basic_string& other) { |
| 1234 | if (this == &other) return; |
nothing calls this directly
no test coverage detected