summaryrefslogtreecommitdiff
path: root/AK/Bitmap.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-03-04 10:05:07 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-04 10:11:37 +0100
commitddaeb294dc8d76f3636cd1dcab88a67d6b3e0610 (patch)
tree3f3954ded6cebecf877bf1088ada15f309cc05c4 /AK/Bitmap.h
parentc1c37cc5bd4c95dd35a56abe17a2522eebdd3635 (diff)
downloadserenity-ddaeb294dc8d76f3636cd1dcab88a67d6b3e0610.zip
AK: Add Bitmap::is_null()
This class has a null state but there was no API to check for it.
Diffstat (limited to 'AK/Bitmap.h')
-rw-r--r--AK/Bitmap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/AK/Bitmap.h b/AK/Bitmap.h
index 9c7a468829..8d8deda091 100644
--- a/AK/Bitmap.h
+++ b/AK/Bitmap.h
@@ -148,6 +148,8 @@ public:
return count;
}
+ bool is_null() const { return !m_data; }
+
u8* data() { return m_data; }
const u8* data() const { return m_data; }