2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-12 12:06:09 +00:00

Runtime: Remove unnecessary c_str() calls

Makes for less noisy code and also gets rid of unnecessary std::strlen
calls in the case things are passed to a std::string_view parameter.
This commit is contained in:
Lioncash
2020-02-28 05:11:20 -05:00
parent 08604d770a
commit f1256faeb7
6 changed files with 26 additions and 25 deletions

View File

@@ -291,7 +291,7 @@ CMorphBall::CMorphBall(CPlayer& player, float radius)
}
void CMorphBall::LoadAnimationTokens(std::string_view ancsName) {
TToken<CDependencyGroup> dgrp = g_SimplePool->GetObj((std::string(ancsName) + "_DGRP").c_str());
TToken<CDependencyGroup> dgrp = g_SimplePool->GetObj(std::string(ancsName).append("_DGRP"));
x1958_animationTokens.clear();
x1958_animationTokens.reserve(dgrp->GetObjectTagVector().size());
for (const SObjectTag& tag : dgrp->GetObjectTagVector()) {