mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps] Rule of 5 (2)
Change-Id: I62eebed201a9f61b3f89233fda4e714f0bab0db7
This commit is contained in:
@@ -6,16 +6,25 @@ using namespace Poincare;
|
||||
|
||||
namespace Shared {
|
||||
|
||||
Function::Function(const char * text, KDColor color) :
|
||||
Function::Function(const char * name, KDColor color) :
|
||||
m_expression(nullptr),
|
||||
m_text{0},
|
||||
m_name(text),
|
||||
m_name(name),
|
||||
m_color(color),
|
||||
m_layout(nullptr),
|
||||
m_active(true)
|
||||
{
|
||||
}
|
||||
|
||||
Function& Function::operator=(const Function& other) {
|
||||
// Self-assignment is benign
|
||||
m_color = other.m_color;
|
||||
m_name = other.m_name;
|
||||
m_active = other.m_active;
|
||||
setContent(other.m_text);
|
||||
return *this;
|
||||
}
|
||||
|
||||
void Function::setContent(const char * c) {
|
||||
strlcpy(m_text, c, sizeof(m_text));
|
||||
if (m_expression != nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user