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

◆ moveFrom()

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

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

1253 {
1254 if (other.isInline()) {
1255 mLength = other.mLength;
1256 fl::memcpy(inlineBufferPtr(), other.inlineBufferPtr(), other.mLength + 1);
1257 // mStorage is already empty (inline mode) from constructor
1258 } else {
1259 mLength = other.mLength;
1260 mStorage = fl::move(other.mStorage);
1261 }
1262 other.mLength = 0;
1263 other.mStorage.reset();
1264 other.inlineBufferPtr()[0] = '\0';
1265}
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 fl::string_n< 32 >::string_n(), and operator=().

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