FastLED 3.9.15
Loading...
Searching...
No Matches

◆ moveAssign()

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

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

1218 {
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}
fl::variant< NotNullStringHolderPtr, ConstLiteral, ConstView > mStorage
char * inlineBufferPtr() FL_NOEXCEPT
constexpr remove_reference< T >::type && move(T &&t) FL_NOEXCEPT
Definition s16x16x4.h:28
void * memcpy(void *dest, const void *src, size_t n) FL_NOEXCEPT

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