Make a lot of one-liner functions inline
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2019-07-04 19:08:13 +02:00
parent bb0a6aba19
commit 32836c6c58
53 changed files with 428 additions and 424 deletions

View File

@@ -49,15 +49,15 @@ namespace Porygon::Binder {
return _type;
};
const unsigned int GetStartPosition() const {
inline const unsigned int GetStartPosition() const {
return _start;
}
const unsigned int GetLength() const {
inline const unsigned int GetLength() const {
return _length;
}
const unsigned int GetEndPosition() const {
inline const unsigned int GetEndPosition() const {
return _start + _length - 1;
}
};
@@ -68,7 +68,7 @@ namespace Porygon::Binder {
make_shared<ScriptType>(
TypeClass::Error)) {}
const BoundExpressionKind GetKind() const final {
inline const BoundExpressionKind GetKind() const final {
return BoundExpressionKind::Bad;
}
};
@@ -81,11 +81,11 @@ namespace Porygon::Binder {
_value(value) {
}
const BoundExpressionKind GetKind() const final {
inline const BoundExpressionKind GetKind() const final {
return BoundExpressionKind::LiteralInteger;
}
const long GetValue() const {
inline const long GetValue() const {
return _value;
}
};
@@ -98,11 +98,11 @@ namespace Porygon::Binder {
_value(value) {
}
const BoundExpressionKind GetKind() const final {
inline const BoundExpressionKind GetKind() const final {
return BoundExpressionKind::LiteralFloat;
}
const double GetValue() const {
inline const double GetValue() const {
return _value;
}
};
@@ -116,11 +116,11 @@ namespace Porygon::Binder {
_value(value) {
}
const BoundExpressionKind GetKind() const final {
inline const BoundExpressionKind GetKind() const final {
return BoundExpressionKind::LiteralString;
}
const u16string GetValue() const {
inline const u16string GetValue() const {
return _value;
}
};
@@ -133,11 +133,11 @@ namespace Porygon::Binder {
_value(value) {
}
const BoundExpressionKind GetKind() const final {
inline const BoundExpressionKind GetKind() const final {
return BoundExpressionKind::LiteralBool;
}
const bool GetValue() const {
inline const bool GetValue() const {
return _value;
}
};
@@ -155,11 +155,11 @@ namespace Porygon::Binder {
delete _key;
}
const BoundExpressionKind GetKind() const final {
inline const BoundExpressionKind GetKind() const final {
return BoundExpressionKind::Variable;
}
const BoundVariableKey *GetKey() const {
inline const BoundVariableKey *GetKey() const {
return _key;
}
};
@@ -183,19 +183,19 @@ namespace Porygon::Binder {
delete _right;
}
const BoundExpressionKind GetKind() const final {
inline const BoundExpressionKind GetKind() const final {
return BoundExpressionKind::Binary;
}
const BoundExpression *GetLeft() const {
inline const BoundExpression *GetLeft() const {
return _left;
}
const BoundExpression *GetRight() const {
inline const BoundExpression *GetRight() const {
return _right;
}
const BoundBinaryOperation GetOperation() const {
inline const BoundBinaryOperation GetOperation() const {
return _operation;
}
};
@@ -215,15 +215,15 @@ namespace Porygon::Binder {
delete _operand;
}
const BoundExpressionKind GetKind() const final {
inline const BoundExpressionKind GetKind() const final {
return BoundExpressionKind::Unary;
}
const BoundExpression *GetOperand() const {
inline const BoundExpression *GetOperand() const {
return _operand;
}
const BoundUnaryOperation GetOperation() const {
inline const BoundUnaryOperation GetOperation() const {
return _operation;
}
};
@@ -243,15 +243,15 @@ namespace Porygon::Binder {
delete _indexExpression;
}
const BoundExpressionKind GetKind() const final {
inline const BoundExpressionKind GetKind() const final {
return BoundExpressionKind::Index;
}
const BoundExpression *GetIndexableExpression() const {
inline const BoundExpression *GetIndexableExpression() const {
return _indexableExpression;
}
const BoundExpression *GetIndexExpression() const {
inline const BoundExpression *GetIndexExpression() const {
return _indexExpression;
}
};
@@ -270,15 +270,15 @@ namespace Porygon::Binder {
delete _indexableExpression;
}
const BoundExpressionKind GetKind() const final {
inline const BoundExpressionKind GetKind() const final {
return BoundExpressionKind::PeriodIndex;
}
const BoundExpression *GetIndexableExpression() const {
inline const BoundExpression *GetIndexableExpression() const {
return _indexableExpression;
}
const Utilities::HashedString GetIndex() const {
inline const Utilities::HashedString GetIndex() const {
return _index;
}
};
@@ -297,11 +297,11 @@ namespace Porygon::Binder {
}
}
const BoundExpressionKind GetKind() const final {
inline const BoundExpressionKind GetKind() const final {
return BoundExpressionKind::NumericalTable;
}
const vector<const BoundExpression *> *GetExpressions() const {
inline const vector<const BoundExpression *> *GetExpressions() const {
return &_expressions;
}
};