1
0
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:
Maarten ter Huurne
2013-08-16 09:16:04 +02:00
parent 8472acc26c
commit 6c80a663e1
9 changed files with 44 additions and 39 deletions

View File

@@ -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;