refactor: use base::size() for array sizes (#18155)
This commit is contained in:
parent
175fae722a
commit
91e3421525
3 changed files with 7 additions and 5 deletions
|
@ -83,7 +83,7 @@ bool ConvertShellLinkToJumpListItem(IShellLink* shell_link,
|
|||
|
||||
item->type = JumpListItem::Type::TASK;
|
||||
wchar_t path[MAX_PATH];
|
||||
if (FAILED(shell_link->GetPath(path, MAX_PATH, nullptr, 0)))
|
||||
if (FAILED(shell_link->GetPath(path, base::size(path), nullptr, 0)))
|
||||
return false;
|
||||
|
||||
CComQIPtr<IPropertyStore> property_store = shell_link;
|
||||
|
@ -100,13 +100,14 @@ bool ConvertShellLinkToJumpListItem(IShellLink* shell_link,
|
|||
}
|
||||
|
||||
int icon_index;
|
||||
if (SUCCEEDED(shell_link->GetIconLocation(path, MAX_PATH, &icon_index))) {
|
||||
if (SUCCEEDED(
|
||||
shell_link->GetIconLocation(path, base::size(path), &icon_index))) {
|
||||
item->icon_path = base::FilePath(path);
|
||||
item->icon_index = icon_index;
|
||||
}
|
||||
|
||||
wchar_t item_desc[INFOTIPSIZE];
|
||||
if (SUCCEEDED(shell_link->GetDescription(item_desc, INFOTIPSIZE)))
|
||||
if (SUCCEEDED(shell_link->GetDescription(item_desc, base::size(item_desc))))
|
||||
item->description = item_desc;
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue