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

◆ moveFrom()

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

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

1228 {
1229 if (other.isInline()) {
1230 mLength = other.mLength;
1231 fl::memcpy(inlineBufferPtr(), other.inlineBufferPtr(), other.mLength + 1);
1232 // mStorage is already empty (inline mode) from constructor
1233 } else {
1234 mLength = other.mLength;
1235 mStorage = fl::move(other.mStorage);
1236 }
1237 other.mLength = 0;
1238 other.mStorage.reset();
1239 other.inlineBufferPtr()[0] = '\0';
1240}
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 fl::string_n< 32 >::string_n(), and operator=().

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