| 1202 | // ======= PROTECTED: MOVE / SWAP / FACTORY HELPERS ======= |
| 1203 | |
| 1204 | void basic_string::moveFrom(basic_string&& other) FL_NOEXCEPT { |
| 1205 | if (other.isInline()) { |
| 1206 | mLength = other.mLength; |
| 1207 | fl::memcpy(inlineBufferPtr(), other.inlineBufferPtr(), other.mLength + 1); |
| 1208 | // mStorage is already empty (inline mode) from constructor |
| 1209 | } else { |
| 1210 | mLength = other.mLength; |
| 1211 | mStorage = fl::move(other.mStorage); |
| 1212 | } |
| 1213 | other.mLength = 0; |
| 1214 | other.mStorage.reset(); |
| 1215 | other.inlineBufferPtr()[0] = '\0'; |
| 1216 | } |
| 1217 | |
| 1218 | void basic_string::moveAssign(basic_string&& other) FL_NOEXCEPT { |
| 1219 | if (this == &other) return; |
nothing calls this directly
no test coverage detected