Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/plugin/PluginDomTraverserBase.h

Issue 29331643: Noissue - Make the use of 'QueryInterface' calls consistent (Closed)
Patch Set: Created Nov. 30, 2015, 6:01 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/plugin/PluginTabBase.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/plugin/PluginDomTraverserBase.h
===================================================================
--- a/src/plugin/PluginDomTraverserBase.h
+++ b/src/plugin/PluginDomTraverserBase.h
@@ -181,7 +181,7 @@
return;
}
- if (FAILED(pBodyDispatch->QueryInterface(IID_IHTMLElement, (LPVOID*)&pBodyEl)) || !pBodyEl)
+ if (FAILED(pBodyDispatch->QueryInterface(&pBodyEl)) || !pBodyEl)
{
return;
}
@@ -361,7 +361,7 @@
{
CComPtr<IHTMLElementCollection> pAllCollection;
- if (SUCCEEDED(pAllCollectionDisp->QueryInterface(IID_IHTMLElementCollection, (LPVOID*)&pAllCollection)) && pAllCollection)
+ if (SUCCEEDED(pAllCollectionDisp->QueryInterface(&pAllCollection)) && pAllCollection)
{
// If number of elements = cached number, return
if (SUCCEEDED(pAllCollection->get_length(&allElementsCount)) && allElementsCount == cacheAllElementsCount)
@@ -421,7 +421,7 @@
if (SUCCEEDED(pEl->get_children(&pChildCollectionDisp)) && pChildCollectionDisp)
{
CComPtr<IHTMLElementCollection> pChildCollection;
- if (SUCCEEDED(pChildCollectionDisp->QueryInterface(IID_IHTMLElementCollection, (LPVOID*)&pChildCollection)) && pChildCollection)
+ if (SUCCEEDED(pChildCollectionDisp->QueryInterface(&pChildCollection)) && pChildCollection)
{
pChildCollection->get_length(&childElementsCount);
@@ -438,7 +438,7 @@
if (SUCCEEDED(pChildCollection->item(vIndex, vRetIndex, &pChildElDispatch)) && pChildElDispatch)
{
CComPtr<IHTMLElement> pChildEl;
- if (SUCCEEDED(pChildElDispatch->QueryInterface(IID_IHTMLElement, (LPVOID*)&pChildEl)) && pChildEl)
+ if (SUCCEEDED(pChildElDispatch->QueryInterface(&pChildEl)) && pChildEl)
{
TraverseChild(pChildEl, pBrowser, indent + " ", isCached);
}
« no previous file with comments | « no previous file | src/plugin/PluginTabBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld