TArray::Swap

Element-wise array element swap. This version is doing more sanity checks than SwapMemory.

Windows
MacOS
Linux

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Containers/Array.h

Include

#include "Containers/Array.h"

Syntax

void Swap
(
    SizeType FirstIndexToSwap,
    SizeType SecondIndexToSwap
)

Remarks

Element-wise array element swap.

This version is doing more sanity checks than SwapMemory.

Parameters

Parameter

Description

FirstIndexToSwap

Position of the first element to swap.

SecondIndexToSwap

Position of the second element to swap.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss