From 842951df6be1ef5ad3a4a2e600c3a1fdc9843d29 Mon Sep 17 00:00:00 2001 From: Angad Date: Sat, 9 Sep 2023 10:04:46 -0700 Subject: [PATCH] fix: make getters return string_view --- CommonLibSF/include/SFSE/Interfaces.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CommonLibSF/include/SFSE/Interfaces.h b/CommonLibSF/include/SFSE/Interfaces.h index 2f88948e..e94e584d 100644 --- a/CommonLibSF/include/SFSE/Interfaces.h +++ b/CommonLibSF/include/SFSE/Interfaces.h @@ -120,9 +120,9 @@ namespace SFSE SetCharBuffer(a_plugin, std::span{ pluginName }); } - constexpr std::string GetPluginName() noexcept + constexpr std::string_view GetPluginName() noexcept { - return std::string{ pluginName }; + return std::string_view{ pluginName }; } constexpr void AuthorName(std::string_view a_name) noexcept @@ -130,9 +130,9 @@ namespace SFSE SetCharBuffer(a_name, std::span{ author }); } - constexpr std::string GetAuthorName() noexcept + constexpr std::string_view GetAuthorName() noexcept { - return std::string{ author }; + return std::string_view{ author }; } constexpr void UsesSigScanning(bool a_value) noexcept