MCPcopy Create free account
hub / github.com/URLab-Sim/UnrealRoboticsLab / MjSetString

Function MjSetString

Source/URLab/Public/MuJoCo/Utils/MjUtils.h:197–203  ·  view source on GitHub ↗

* @brief Write a UE FString to an mjString* field, but only if non-empty. * * Replaces the gated pattern: * if (!Name.IsEmpty()) mjs_setString(Element->name, TCHAR_TO_UTF8(*Name)); * with: * MjSetString(Element->name, Name); * * @param Field The mjString* field (e.g. Element->childclass). * @param Value The UE FString to write. No-op if empty. */

Source from the content-addressed store, hash-verified

195 * @param Value The UE FString to write. No-op if empty.
196 */
197inline void MjSetString(mjString* Field, const FString& Value)
198{
199 if (!Value.IsEmpty())
200 {
201 mjs_setString(Field, TCHAR_TO_UTF8(*Value));
202 }
203}
204
205/**
206 * @brief Unconditionally write a UE FString to an mjString* field.

Callers 9

ExportToMethod · 0.85
ExportToMethod · 0.85
ExportToMethod · 0.85
ExportToMethod · 0.85
ExportToMethod · 0.85
ExportToMethod · 0.85
ExportToMethod · 0.85
ExportToMethod · 0.85
ExportToMethod · 0.85

Calls 1

IsEmptyMethod · 0.80

Tested by

no test coverage detected