made Link a struct

This commit is contained in:
fourtf
2018-01-28 03:52:52 +01:00
parent 99aac9eb6a
commit 11775071b9
4 changed files with 10 additions and 28 deletions
-12
View File
@@ -2,7 +2,6 @@
namespace chatterino {
namespace messages {
Link::Link()
: type(None)
, value(QString())
@@ -19,16 +18,5 @@ bool Link::isValid() const
{
return this->type != None;
}
Link::Type Link::getType() const
{
return this->type;
}
const QString &Link::getValue() const
{
return this->value;
}
} // namespace messages
} // namespace chatterino
+3 -9
View File
@@ -4,9 +4,7 @@
namespace chatterino {
namespace messages {
class Link
{
struct Link {
public:
enum Type {
None,
@@ -23,14 +21,10 @@ public:
Link();
Link(Type getType, const QString &getValue);
bool isValid() const;
Type getType() const;
const QString &getValue() const;
private:
Type type;
QString value;
};
bool isValid() const;
};
} // namespace messages
} // namespace chatterino