TScriptMap::FindOrAdd

Constructs a new key-value pair if key didn't exist

Windows
MacOS
Linux

References

Module

Core

Header

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

Include

#include "Containers/Map.h"

Syntax

void * FindOrAdd
(
    const void * Key,
    const FScriptMapLayout & Layout,
    TFunctionRef< uint32 *)> GetKeyHash,
    TFunctionRef< bool *, const void *)> KeyEqualityFn,
    TFunctionRef< void *, void *)> ConstructPairFn
)

Remarks

Constructs a new key-value pair if key didn't exist

No need to rehash after calling. The hash table must be properly hashed before calling.

Returns

The address to the value, not the pair

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