mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
small optimization for the last change
svn path=/trunk/; revision=14956
This commit is contained in:
parent
63415000fe
commit
7b8809480b
1 changed files with 5 additions and 5 deletions
|
@ -252,7 +252,8 @@ void StartMenu::AddShellEntries(const ShellDirectory& dir, int max, const String
|
|||
|
||||
if (_tcsicmp(trim_path_slash(dir_path), trim_path_slash(ignore_path)))
|
||||
*ignore_name = '\0';
|
||||
}
|
||||
} else
|
||||
*ignore_name = '\0';
|
||||
|
||||
int cnt = 0;
|
||||
for(Entry*entry=dir._down; entry; entry=entry->_next) {
|
||||
|
@ -261,10 +262,9 @@ void StartMenu::AddShellEntries(const ShellDirectory& dir, int max, const String
|
|||
//not appropriate for drive roots: if (entry->_data.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN)
|
||||
continue;
|
||||
|
||||
// hide subfolders if requested
|
||||
if (!ignore.empty())
|
||||
if (*ignore_name && !_tcsicmp(entry->_data.cFileName, ignore_name))
|
||||
continue;
|
||||
// hide "Programs" subfolders if requested
|
||||
if (*ignore_name && !_tcsicmp(entry->_data.cFileName, ignore_name))
|
||||
continue;
|
||||
|
||||
// only 'max' entries shall be added.
|
||||
if (++cnt == max)
|
||||
|
|
Loading…
Reference in a new issue