Make a lot of one-liner functions inline
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -22,7 +22,7 @@ namespace Porygon::UserData {
|
||||
_obj = obj;
|
||||
}
|
||||
|
||||
const TypeClass GetTypeClass() const final {
|
||||
inline const TypeClass GetTypeClass() const final {
|
||||
return TypeClass::UserData;
|
||||
}
|
||||
|
||||
@@ -32,11 +32,11 @@ namespace Porygon::UserData {
|
||||
return _obj == ((UserDataValue *) b)->_obj;
|
||||
}
|
||||
|
||||
const shared_ptr<EvalValue> Clone() const final {
|
||||
inline const shared_ptr<EvalValue> Clone() const final {
|
||||
return make_shared<UserDataValue>(_userData, _obj);
|
||||
}
|
||||
|
||||
const std::size_t GetHashCode() const final {
|
||||
inline const std::size_t GetHashCode() const final {
|
||||
return reinterpret_cast<intptr_t>(_obj);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace Porygon::UserData {
|
||||
return shared_ptr<EvalValue>(field->Get(_obj));
|
||||
}
|
||||
|
||||
const shared_ptr<EvalValue> IndexValue(uint32_t hash) const final {
|
||||
inline const shared_ptr<EvalValue> IndexValue(uint32_t hash) const final {
|
||||
auto field = _userData->GetField(hash);
|
||||
return shared_ptr<EvalValue>(field->Get(_obj));
|
||||
}
|
||||
@@ -57,7 +57,7 @@ namespace Porygon::UserData {
|
||||
field->Set(_obj, value.get());
|
||||
}
|
||||
|
||||
void* GetObjectPointer(){
|
||||
inline void* GetObjectPointer(){
|
||||
return _obj;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user