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

◆ swap()

void fl::string::swap ( string & other)

Definition at line 359 of file str.cpp.

359 {
360 if (this != &other) {
361 fl::swap(mLength, other.mLength);
362 char temp[FASTLED_STR_INLINED_SIZE];
363 memcpy(temp, mInlineData, FASTLED_STR_INLINED_SIZE);
364 memcpy(mInlineData, other.mInlineData, FASTLED_STR_INLINED_SIZE);
365 memcpy(other.mInlineData, temp, FASTLED_STR_INLINED_SIZE);
366 fl::swap(mHeapData, other.mHeapData);
367 }
368}
void swap(array< T, N > &lhs, array< T, N > &rhs) noexcept(noexcept(lhs.swap(rhs)))
Definition array.h:156

References fl::StrN< SIZE >::mHeapData, fl::StrN< FASTLED_STR_INLINED_SIZE >::mHeapData, fl::StrN< SIZE >::mInlineData, fl::StrN< FASTLED_STR_INLINED_SIZE >::mInlineData, fl::StrN< SIZE >::mLength, fl::StrN< FASTLED_STR_INLINED_SIZE >::mLength, and fl::swap().

+ Here is the call graph for this function: