Flags should not be overlapping

This commit is contained in:
Marius Kintel 2015-12-08 16:04:20 -05:00
parent 74eaeba2eb
commit 0190d52d8e

View file

@ -12,7 +12,7 @@ public:
enum Flag { enum Flag {
FLAG_NONE = 0x00, FLAG_NONE = 0x00,
FLAG_BACKGROUND = 0x01, FLAG_BACKGROUND = 0x01,
FLAG_HIGHLIGHT = 0x03 FLAG_HIGHLIGHT = 0x02
}; };
@ -23,6 +23,8 @@ public:
Flag flag; Flag flag;
const BoundingBox &getBoundingBox() const { return this->bbox; } const BoundingBox &getBoundingBox() const { return this->bbox; }
bool isHighlight() const { return this->flag & FLAG_HIGHLIGHT; }
bool isBackground() const { return this->flag & FLAG_BACKGROUND; }
virtual std::string dump() = 0; virtual std::string dump() = 0;
protected: protected: