Skip to content

Commit

Permalink
Minor string manipulation changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sixze committed Jan 1, 2024
1 parent 080d87c commit 1460e8e
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 22 deletions.
3 changes: 1 addition & 2 deletions Source/ALS/Private/Nodes/AlsAnimNode_CurvesBlend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,8 @@ void FAlsAnimNode_CurvesBlend::GatherDebugData(FNodeDebugData& DebugData)
{
DECLARE_SCOPE_HIERARCHICAL_COUNTER_ANIMNODE(GatherDebugData)

TStringBuilder<256> DebugItemBuilder;
TStringBuilder<256> DebugItemBuilder{InPlace, DebugData.GetNodeName(this), TEXTVIEW(": Blend Amount: ")};

DebugItemBuilder << DebugData.GetNodeName(this) << TEXTVIEW(": Blend Amount: ");
DebugItemBuilder.Appendf(TEXT("%.2f"), GetBlendAmount());

DebugData.AddDebugItem(FString{DebugItemBuilder});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ UAlsAnimNotifyState_SetLocomotionAction::UAlsAnimNotifyState_SetLocomotionAction

FString UAlsAnimNotifyState_SetLocomotionAction::GetNotifyName_Implementation() const
{
TStringBuilder<256> NotifyNameBuilder;

NotifyNameBuilder << TEXTVIEW("Als Set Locomotion Action: ")
<< FName::NameToDisplayString(UAlsUtility::GetSimpleTagName(LocomotionAction).ToString(), false);
TStringBuilder<256> NotifyNameBuilder{
InPlace, TEXTVIEW("Als Set Locomotion Action: "),
FName::NameToDisplayString(UAlsUtility::GetSimpleTagName(LocomotionAction).ToString(), false)
};

return FString{NotifyNameBuilder};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@ UAlsAnimNotifyState_SetRootMotionScale::UAlsAnimNotifyState_SetRootMotionScale()

FString UAlsAnimNotifyState_SetRootMotionScale::GetNotifyName_Implementation() const
{
TStringBuilder<64> NotifyNameBuilder;
TStringBuilder<64> NotifyNameBuilder{InPlace, TEXTVIEW("Als Set Root Motion Scale: ")};

NotifyNameBuilder << TEXTVIEW("Als Set Root Motion Scale: ");
NotifyNameBuilder.Appendf(TEXT("%.2f"), TranslationScale);

return FString{NotifyNameBuilder};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ void UAlsFootstepEffectsSettings::PostEditChangeProperty(FPropertyChangedEvent&

FString UAlsAnimNotify_FootstepEffects::GetNotifyName_Implementation() const
{
TStringBuilder<64> NotifyNameBuilder;

NotifyNameBuilder << TEXTVIEW("Als Footstep Effects: ") << AlsEnumUtility::GetNameStringByValue(FootBone);
TStringBuilder<64> NotifyNameBuilder{InPlace, TEXTVIEW("Als Footstep Effects: "), AlsEnumUtility::GetNameStringByValue(FootBone)};

return FString{NotifyNameBuilder};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ UAlsAnimNotify_SetGroundedEntryMode::UAlsAnimNotify_SetGroundedEntryMode()

FString UAlsAnimNotify_SetGroundedEntryMode::GetNotifyName_Implementation() const
{
TStringBuilder<256> NotifyNameBuilder;

NotifyNameBuilder << TEXTVIEW("Als Set Grounded Entry Mode: ")
<< FName::NameToDisplayString(UAlsUtility::GetSimpleTagName(GroundedEntryMode).ToString(), false);
TStringBuilder<256> NotifyNameBuilder{
InPlace, TEXTVIEW("Als Set Grounded Entry Mode: "),
FName::NameToDisplayString(UAlsUtility::GetSimpleTagName(GroundedEntryMode).ToString(), false)
};

return FString{NotifyNameBuilder};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,9 @@ UScriptStruct* FAlsRootMotionSource_Mantling::GetScriptStruct() const

FString FAlsRootMotionSource_Mantling::ToSimpleString() const
{
TStringBuilder<256> StringBuilder;

StringBuilder << ALS_GET_TYPE_STRING(FAlsRootMotionSource_Mantling)
<< TEXTVIEW(" (") << InstanceName << TEXTVIEW(", ") << LocalID << TEXT(')');
TStringBuilder<256> StringBuilder{
InPlace, ALS_GET_TYPE_STRING(FAlsRootMotionSource_Mantling), TEXTVIEW(" ("), InstanceName, TEXTVIEW(", "), LocalID, TEXT(')')
};

return FString{StringBuilder};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ UAlsAnimNotify_CameraShake::UAlsAnimNotify_CameraShake()

FString UAlsAnimNotify_CameraShake::GetNotifyName_Implementation() const
{
TStringBuilder<256> NotifyNameBuilder;

NotifyNameBuilder << TEXTVIEW("Als Camera Shake: ");
TStringBuilder<256> NotifyNameBuilder{InPlace, TEXTVIEW("Als Camera Shake: ")};

if (IsValid(CameraShakeClass))
{
Expand Down

0 comments on commit 1460e8e

Please sign in to comment.