From e0e38b569e1f0a08a822589804822941e91b6a89 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 3 Oct 2019 00:41:23 -0400 Subject: [PATCH] CAtomicAlpha: Remove .data() call in SBomb constructor We can just use the std::string_view constructor for std::string, which eliminates an unnecessary strlen call. --- Runtime/MP1/World/CAtomicAlpha.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runtime/MP1/World/CAtomicAlpha.hpp b/Runtime/MP1/World/CAtomicAlpha.hpp index 951f52ccd..5f1a9e335 100644 --- a/Runtime/MP1/World/CAtomicAlpha.hpp +++ b/Runtime/MP1/World/CAtomicAlpha.hpp @@ -15,7 +15,7 @@ class CAtomicAlpha : public CPatterned { pas::ELocomotionType x10_locomotionType; float x14_scaleTime = FLT_MAX; SBomb(const std::string_view locator, pas::ELocomotionType locomotionType) - : x0_locatorName(locator.data()), x10_locomotionType(locomotionType) {} + : x0_locatorName(locator), x10_locomotionType(locomotionType) {} }; bool x568_24_inRange : 1; bool x568_25_invisible : 1;