Use std::string_view for strings

This commit is contained in:
SirLynix
2024-01-04 14:40:50 +01:00
parent 0cd8cff53e
commit 2125b80b8d
9 changed files with 18 additions and 18 deletions

View File

@@ -18,7 +18,7 @@ namespace Nz
Node::SetParent(nodeComponent, keepDerived);
}
void NodeComponent::SetParentJoint(entt::handle entity, const std::string& jointName, bool keepDerived)
void NodeComponent::SetParentJoint(entt::handle entity, std::string_view jointName, bool keepDerived)
{
SkeletonComponentBase* skeletonComponent = entity.try_get<SkeletonComponent>();
if (!skeletonComponent)

View File

@@ -376,7 +376,7 @@ namespace Nz
return false;
};
void RichTextDrawer::GenerateGlyphs(const Font& font, const Color& color, TextStyleFlags style, unsigned int characterSize, const Color& outlineColor, float characterSpacingOffset, float lineSpacingOffset, float outlineThickness, const std::string& text) const
void RichTextDrawer::GenerateGlyphs(const Font& font, const Color& color, TextStyleFlags style, unsigned int characterSize, const Color& outlineColor, float characterSpacingOffset, float lineSpacingOffset, float outlineThickness, std::string_view text) const
{
if (text.empty())
return;