зеркало из https://github.com/electron/electron.git
chore: replace uses of `ComPtr::GetAddressOf()` with `ComPtr::operator&` (#37948)
chore: replace uses of ComPtr::GetAddressOf() with ComPtr::operator&
This commit is contained in:
Родитель
d1cddf2517
Коммит
f0e1848a5e
|
@ -278,7 +278,7 @@ void ShowItemInFolderOnWorkerThread(const base::FilePath& full_path) {
|
|||
return;
|
||||
|
||||
Microsoft::WRL::ComPtr<IShellFolder> desktop;
|
||||
HRESULT hr = SHGetDesktopFolder(desktop.GetAddressOf());
|
||||
HRESULT hr = SHGetDesktopFolder(&desktop);
|
||||
if (FAILED(hr))
|
||||
return;
|
||||
|
||||
|
@ -297,8 +297,7 @@ void ShowItemInFolderOnWorkerThread(const base::FilePath& full_path) {
|
|||
return;
|
||||
|
||||
const ITEMIDLIST* highlight[] = {file_item};
|
||||
hr = SHOpenFolderAndSelectItems(dir_item, std::size(highlight), highlight,
|
||||
NULL);
|
||||
hr = SHOpenFolderAndSelectItems(dir_item, std::size(highlight), highlight, 0);
|
||||
if (FAILED(hr)) {
|
||||
// On some systems, the above call mysteriously fails with "file not
|
||||
// found" even though the file is there. In these cases, ShellExecute()
|
||||
|
@ -379,9 +378,8 @@ bool MoveItemToTrashWithError(const base::FilePath& path,
|
|||
|
||||
// Create an IShellItem from the supplied source path.
|
||||
Microsoft::WRL::ComPtr<IShellItem> delete_item;
|
||||
if (FAILED(SHCreateItemFromParsingName(
|
||||
path.value().c_str(), NULL,
|
||||
IID_PPV_ARGS(delete_item.GetAddressOf())))) {
|
||||
if (FAILED(SHCreateItemFromParsingName(path.value().c_str(), NULL,
|
||||
IID_PPV_ARGS(&delete_item)))) {
|
||||
*error = "Failed to parse path";
|
||||
return false;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче