summaryrefslogtreecommitdiffstats
path: root/gui/resources.hpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2018-08-24 18:17:36 +0200
committerEthan Yonker <dees_troy@teamw.in>2018-08-24 18:17:39 +0200
commit58f2132bc3954fc704787d477500a209eedb8e29 (patch)
treeeb0f79aacd68724b0c0c091018384ef924380f47 /gui/resources.hpp
parentRemove remaining pieces of supersu (diff)
parentSnap for 4745538 from 723056a83f8c8b15af02d9c302862dbb2304ea8c to pi-release (diff)
downloadandroid_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar.gz
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar.bz2
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar.lz
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar.xz
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.tar.zst
android_bootable_recovery-58f2132bc3954fc704787d477500a209eedb8e29.zip
Diffstat (limited to 'gui/resources.hpp')
-rw-r--r--gui/resources.hpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/gui/resources.hpp b/gui/resources.hpp
index de673184c..69bebc70e 100644
--- a/gui/resources.hpp
+++ b/gui/resources.hpp
@@ -57,8 +57,8 @@ public:
virtual ~FontResource();
public:
- void* GetResource() { return this ? mFont : NULL; }
- int GetHeight() { return gr_ttf_getMaxFontHeight(this ? mFont : NULL); }
+ void* GetResource() { return mFont; }
+ int GetHeight() { return gr_ttf_getMaxFontHeight(mFont); }
void Override(xml_node<>* node, ZipWrap* pZip);
protected:
@@ -80,9 +80,9 @@ public:
virtual ~ImageResource();
public:
- gr_surface GetResource() { return this ? mSurface : NULL; }
- int GetWidth() { return gr_get_width(this ? mSurface : NULL); }
- int GetHeight() { return gr_get_height(this ? mSurface : NULL); }
+ gr_surface GetResource() { return mSurface; }
+ int GetWidth() { return gr_get_width(mSurface); }
+ int GetHeight() { return gr_get_height(mSurface); }
protected:
gr_surface mSurface;
@@ -95,10 +95,10 @@ public:
virtual ~AnimationResource();
public:
- gr_surface GetResource() { return (!this || mSurfaces.empty()) ? NULL : mSurfaces.at(0); }
- gr_surface GetResource(int entry) { return (!this || mSurfaces.empty()) ? NULL : mSurfaces.at(entry); }
- int GetWidth() { return gr_get_width(this ? GetResource() : NULL); }
- int GetHeight() { return gr_get_height(this ? GetResource() : NULL); }
+ gr_surface GetResource() { return mSurfaces.empty() ? NULL : mSurfaces.at(0); }
+ gr_surface GetResource(int entry) { return mSurfaces.empty() ? NULL : mSurfaces.at(entry); }
+ int GetWidth() { return gr_get_width(GetResource()); }
+ int GetHeight() { return gr_get_height(GetResource()); }
int GetResourceCount() { return mSurfaces.size(); }
protected: