Skip to content

Commit

Permalink
Use !::empty() instead of ::size() > 0 for vectors
Browse files Browse the repository at this point in the history
  • Loading branch information
MiKom committed Jul 12, 2024
1 parent 7202b0d commit b241560
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ void LinuxWaylandPlatformInput::touchDown(wl_touch *touch, uint32_t serial, uint
wl_surface *surface, int32_t id, wl_fixed_t x, wl_fixed_t y)
{
// We don't support touch yet, so just use the first touch point as mouse input
if (m_touch.points.size() > 0) {
if (!m_touch.points.empty()) {
return;
}

Expand Down Expand Up @@ -543,7 +543,7 @@ void LinuxWaylandPlatformInput::touchFrame(wl_touch *touch)

void LinuxWaylandPlatformInput::touchCancel(wl_touch *touch)
{
if (m_touch.points.size() > 0) {
if (!m_touch.points.empty()) {
m_touch.focus->handleMouseRelease(m_touch.time, MouseButton::LeftButton, int16_t(m_touch.points[0].pos.x), int16_t(m_touch.points[0].pos.y));
m_touch.points.clear();
}
Expand Down

0 comments on commit b241560

Please sign in to comment.