TScriptMap::FindOrAdd

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

Choose your operating system:

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