animations: minor follow-up fix for std::string (#49)

This commit is contained in:
Sergey Fedorov 2025-03-26 18:17:49 +08:00 committed by GitHub
parent fbd02eb032
commit 7248194a2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,6 +6,7 @@ using namespace Hyprutils::Animation;
using namespace Hyprutils::Memory; using namespace Hyprutils::Memory;
static const std::string DEFAULTBEZIERNAME = "default"; static const std::string DEFAULTBEZIERNAME = "default";
static const std::string DEFAULTSTYLE = "";
#define SP CSharedPointer #define SP CSharedPointer
#define WP CWeakPointer #define WP CWeakPointer
@ -54,8 +55,6 @@ const std::string& CBaseAnimatedVariable::getBezierName() const {
} }
const std::string& CBaseAnimatedVariable::getStyle() const { const std::string& CBaseAnimatedVariable::getStyle() const {
static constexpr const std::string DEFAULTSTYLE = "";
if (const auto PCONFIG = m_pConfig.lock()) { if (const auto PCONFIG = m_pConfig.lock()) {
const auto PVALUES = PCONFIG->pValues.lock(); const auto PVALUES = PCONFIG->pValues.lock();
return PVALUES ? PVALUES->internalStyle : DEFAULTSTYLE; return PVALUES ? PVALUES->internalStyle : DEFAULTSTYLE;