LibGfx: Don't constexpr functions returning Strings

Since strings don't have a constexpr constructor, these won't have any
effect anyways. Furthermore, this is explicitly disallowed by the
standard, and makes Clang tools freak out.
This commit is contained in:
Daniel Bertalan 2021-06-20 21:11:29 +02:00 committed by Ali Mohammad Pur
parent 221bd464a0
commit e364845456
Notes: sideshowbarker 2024-07-18 11:34:31 +09:00
3 changed files with 3 additions and 3 deletions

View file

@ -108,7 +108,7 @@ public:
return sqrt(m_x * m_x + m_y * m_y);
}
constexpr String to_string() const
String to_string() const
{
return String::formatted("[{},{}]", x(), y());
}

View file

@ -124,7 +124,7 @@ public:
return sqrt(m_x * m_x + m_y * m_y + m_z * m_z);
}
constexpr String to_string() const
String to_string() const
{
return String::formatted("[{},{},{}]", x(), y(), z());
}

View file

@ -124,7 +124,7 @@ public:
return sqrt(m_x * m_x + m_y * m_y + m_z * m_z + m_w * m_w);
}
constexpr String to_string() const
String to_string() const
{
return String::formatted("[{},{},{},{}]", x(), y(), z(), w());
}