TSet::FindOrAdd

Adds an element to the set if not already present and returns a reference to the added or existing element.

References

Module

Core

Header

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

Include

#include "Containers/Set.h"

Syntax

ElementType & FindOrAdd
(
    const InElementType & InElement,
    bool * bIsAlreadyInSetPtr
)

Remarks

Adds an element to the set if not already present and returns a reference to the added or existing element.

Returns

A reference to the element stored in the set.

Parameters

Parameter

Description

InElement

Element to add to set

bIsAlreadyInSetPtr

[out] Optional pointer to bool that will be set depending on whether element is already in set

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