mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-23 04:16:50 +01:00
Added more helper methods to DirAccessRef and FileAccessRef. Also smaller cleanups.
This commit is contained in:
parent
10e87baee9
commit
e15630d7f2
@ -140,12 +140,18 @@ public:
|
||||
};
|
||||
|
||||
struct DirAccessRef {
|
||||
DirAccess *f;
|
||||
|
||||
_FORCE_INLINE_ bool is_null() const { return f == nullptr; }
|
||||
_FORCE_INLINE_ bool is_valid() const { return f != nullptr; }
|
||||
|
||||
_FORCE_INLINE_ operator bool() const { return f != nullptr; }
|
||||
_FORCE_INLINE_ operator DirAccess *() { return f; }
|
||||
|
||||
_FORCE_INLINE_ DirAccess *operator->() {
|
||||
return f;
|
||||
}
|
||||
|
||||
operator bool() const { return f != nullptr; }
|
||||
DirAccess *f;
|
||||
DirAccessRef(DirAccess *fa) { f = fa; }
|
||||
DirAccessRef(DirAccessRef &&other) {
|
||||
f = other.f;
|
||||
|
@ -177,13 +177,18 @@ public:
|
||||
};
|
||||
|
||||
struct FileAccessRef {
|
||||
FileAccess *f;
|
||||
|
||||
_FORCE_INLINE_ bool is_null() const { return f == nullptr; }
|
||||
_FORCE_INLINE_ bool is_valid() const { return f != nullptr; }
|
||||
|
||||
_FORCE_INLINE_ operator bool() const { return f != nullptr; }
|
||||
_FORCE_INLINE_ operator FileAccess *() { return f; }
|
||||
|
||||
_FORCE_INLINE_ FileAccess *operator->() {
|
||||
return f;
|
||||
}
|
||||
|
||||
operator bool() const { return f != nullptr; }
|
||||
FileAccess *f;
|
||||
operator FileAccess *() { return f; }
|
||||
FileAccessRef(FileAccess *fa) { f = fa; }
|
||||
FileAccessRef(FileAccessRef &&other) {
|
||||
f = other.f;
|
||||
|
Loading…
Reference in New Issue
Block a user