use empty() instead of comparison with an empty string

This commit is contained in:
Ingo Weyrich
2019-07-22 13:49:08 +02:00
parent fd6453d1a8
commit cbb3f05b7e
25 changed files with 85 additions and 356 deletions

View File

@@ -45,6 +45,12 @@ void LWButton::setPosition (int x, int y)
ypos = y;
}
void LWButton::addPosition (int x, int y)
{
xpos += x;
ypos += y;
}
void LWButton::getPosition (int& x, int& y) const
{
@@ -219,15 +225,11 @@ void LWButton::getAlignment (Alignment& ha, Alignment& va) const
Glib::ustring LWButton::getToolTip (int x, int y) const
{
if (inside(x, y)) {
if (toolTip) {
return *toolTip;
} else {
return "";
}
} else {
return "";
}
if (inside(x, y) && toolTip) {
return *toolTip;
} else {
return {};
}
}
void LWButton::setToolTip (Glib::ustring* tooltip)