FastLED 3.10.10
Loading...
Searching...
No Matches

◆ moveAssign()

void fl::basic_string::moveAssign ( basic_string && other)
protected

Definition at line 1267 of file basic_string.cpp.hpp.

1267 {
1268 if (this == &other) return;
1269 if (other.isInline()) {
1270 mLength = other.mLength;
1271 mStorage.reset();
1272 fl::memcpy(inlineBufferPtr(), other.inlineBufferPtr(), other.mLength + 1);
1273 } else {
1274 mLength = other.mLength;
1275 mStorage = fl::move(other.mStorage);
1276 }
1277 other.mLength = 0;
1278 other.mStorage.reset();
1279 other.inlineBufferPtr()[0] = '\0';
1280}
char * inlineBufferPtr() FL_NO_EXCEPT
fl::variant< NotNullStringHolderPtr, ConstLiteral, ConstView > mStorage
constexpr remove_reference< T >::type && move(T &&t) FL_NO_EXCEPT
Definition s16x16x4.h:30
FASTLED_FORCE_INLINE void * memcpy(void *dest, const void *src, size_t n) FL_NO_EXCEPT
Definition cstring.h:136

References basic_string(), fl::FL_NO_EXCEPT, inlineBufferPtr(), fl::memcpy(), mLength, fl::fl::adl_barrier::move(), and mStorage.

Referenced by assign(), operator=(), fl::string::operator=(), and fl::string_n< 32 >::operator=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: