Sfoglia il codice sorgente

AK: Add Bitmap::is_null()

This class has a null state but there was no API to check for it.
Andreas Kling 4 anni fa
parent
commit
ddaeb294dc
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      AK/Bitmap.h

+ 2 - 0
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; }