mirror of
git://projects.qi-hardware.com/gmenu2x.git
synced 2025-04-21 12:27:27 +03:00
Check for empty strings using empty() instead of comparing to ""
This commit is contained in:
@@ -411,9 +411,9 @@ bool Menu::addActionLink(uint section, const string &title, function_t action, c
|
||||
}
|
||||
|
||||
bool Menu::addLink(string path, string file, string section) {
|
||||
if (section=="")
|
||||
if (section.empty()) {
|
||||
section = selSection();
|
||||
else if (find(sections.begin(),sections.end(),section)==sections.end()) {
|
||||
} else if (find(sections.begin(),sections.end(),section)==sections.end()) {
|
||||
//section directory doesn't exists
|
||||
if (!addSection(section))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user