Bug 348748 - Replace all instances of NS_STATIC_CAST and friends with C++ casts (and simultaneously bitrot nearly every patch in existence). r=bsmedberg on the script that did this. Tune in next time for Macro Wars: Episode II: Attack on the LL_* Macros.
git-svn-id: svn://10.0.0.236/trunk@229504 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -649,11 +649,11 @@ nsDocumentEncoder::SerializeRangeNodes(nsIDOMRange* aRange,
|
||||
nsCOMPtr<nsIContent> startNode, endNode;
|
||||
PRInt32 start = mStartRootIndex - aDepth;
|
||||
if (start >= 0 && start <= mStartNodes.Count())
|
||||
startNode = NS_STATIC_CAST(nsIContent *, mStartNodes[start]);
|
||||
startNode = static_cast<nsIContent *>(mStartNodes[start]);
|
||||
|
||||
PRInt32 end = mEndRootIndex - aDepth;
|
||||
if (end >= 0 && end <= mEndNodes.Count())
|
||||
endNode = NS_STATIC_CAST(nsIContent *, mEndNodes[end]);
|
||||
endNode = static_cast<nsIContent *>(mEndNodes[end]);
|
||||
|
||||
if ((startNode != content) && (endNode != content))
|
||||
{
|
||||
@@ -1236,7 +1236,7 @@ nsHTMLCopyEncoder::EncodeToStringWithContext(nsAString& aContextString,
|
||||
PRInt32 i;
|
||||
nsCOMPtr<nsIDOMNode> node;
|
||||
if (count > 0)
|
||||
node = NS_STATIC_CAST(nsIDOMNode *, mCommonAncestors.ElementAt(0));
|
||||
node = static_cast<nsIDOMNode *>(mCommonAncestors.ElementAt(0));
|
||||
|
||||
if (node && IsTextNode(node))
|
||||
{
|
||||
@@ -1251,13 +1251,13 @@ nsHTMLCopyEncoder::EncodeToStringWithContext(nsAString& aContextString,
|
||||
i = count;
|
||||
while (i > 0)
|
||||
{
|
||||
node = NS_STATIC_CAST(nsIDOMNode *, mCommonAncestors.ElementAt(--i));
|
||||
node = static_cast<nsIDOMNode *>(mCommonAncestors.ElementAt(--i));
|
||||
SerializeNodeStart(node, 0, -1, aContextString);
|
||||
}
|
||||
//i = 0; guaranteed by above
|
||||
while (i < count)
|
||||
{
|
||||
node = NS_STATIC_CAST(nsIDOMNode *, mCommonAncestors.ElementAt(i++));
|
||||
node = static_cast<nsIDOMNode *>(mCommonAncestors.ElementAt(i++));
|
||||
SerializeNodeEnd(node, aContextString);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user