FastLED 3.10.6
Loading...
Searching...
No Matches

◆ moveAssign()

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

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

1242 {
1243 if (this == &other) return;
1244 if (other.isInline()) {
1245 mLength = other.mLength;
1246 mStorage.reset();
1247 fl::memcpy(inlineBufferPtr(), other.inlineBufferPtr(), other.mLength + 1);
1248 } else {
1249 mLength = other.mLength;
1250 mStorage = fl::move(other.mStorage);
1251 }
1252 other.mLength = 0;
1253 other.mStorage.reset();
1254 other.inlineBufferPtr()[0] = '\0';
1255}
char * inlineBufferPtr() FL_NO_EXCEPT
fl::variant< NotNullStringHolderPtr, ConstLiteral, ConstView > mStorage
constexpr remove_reference< T >::type && move(T &&t) FL_NO_EXCEPT
Definition move.h:28
void * memcpy(void *dest, const void *src, size_t n) FL_NO_EXCEPT

References basic_string(), fl::FL_NO_EXCEPT, inlineBufferPtr(), fl::memcpy(), mLength, fl::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: