MCPcopy Create free account
hub / github.com/FastLED/FastLED / moveAssign

Method moveAssign

src/fl/stl/basic_string.cpp.hpp:1218–1231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1216}
1217
1218void 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
1233void basic_string::swapWith(basic_string& other) {
1234 if (this == &other) return;

Callers

nothing calls this directly

Calls 4

memcpyFunction · 0.50
isInlineMethod · 0.45
resetMethod · 0.45
inlineBufferPtrMethod · 0.45

Tested by

no test coverage detected