mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Initializing values can (and should) be done with this syntax
This commit is contained in:
parent
00ff1e72e2
commit
e76eeb661a
25
word.cpp
25
word.cpp
|
@ -1,22 +1,25 @@
|
|||
#include "word.h"
|
||||
|
||||
// Image word
|
||||
Word::Word(LazyLoadedImage* image, Type type, const QString& copytext, const QString& tooltip)
|
||||
: m_image(image)
|
||||
, m_text()
|
||||
, m_isImage(true)
|
||||
, m_type(type)
|
||||
, m_copyText(copytext)
|
||||
, m_tooltip(tooltip)
|
||||
{
|
||||
this->m_image = image;
|
||||
m_isImage = true;
|
||||
m_type = type;
|
||||
m_copyText = copytext;
|
||||
m_tooltip = tooltip;
|
||||
}
|
||||
|
||||
// Text word
|
||||
Word::Word(const QString& text, Type type, const QString& copytext, const QString& tooltip)
|
||||
: m_image(nullptr)
|
||||
, m_text(text)
|
||||
, m_isImage(true)
|
||||
, m_type(type)
|
||||
, m_copyText(copytext)
|
||||
, m_tooltip(tooltip)
|
||||
{
|
||||
this->m_image = NULL;
|
||||
this->m_text = text;
|
||||
m_isImage = false;
|
||||
m_type = type;
|
||||
m_copyText = copytext;
|
||||
m_tooltip = tooltip;
|
||||
}
|
||||
|
||||
Word::~Word()
|
||||
|
|
Loading…
Reference in a new issue