Mark isEmpty method in Node class as [[nodiscard]] and const to enforce proper usage and ensure immutability.
This commit is contained in:
parent
a8d41baab7
commit
ae04874c48
@ -13,7 +13,7 @@ public:
|
|||||||
m_y2 = y2;
|
m_y2 = y2;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isEmpty() {
|
[[nodiscard]] bool isEmpty() const {
|
||||||
return m_x1 < 0 && m_y1 < 0 && m_x2 < 0 && m_y2 < 0 && text.isEmpty() && className.isEmpty();
|
return m_x1 < 0 && m_y1 < 0 && m_x2 < 0 && m_y2 < 0 && text.isEmpty() && className.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user