Issue #1375 - Overload FromContent() to work with const

This commit is contained in:
Matt A. Tobin 2020-04-16 17:53:41 -04:00 committed by Roy Tam
commit 484b481031

View file

@ -1028,7 +1028,15 @@ inline nsIContent* nsINode::AsContent()
{ \
return aContent->_check ? static_cast<_class*>(aContent) : nullptr; \
} \
static const _class* FromContent(const nsIContent* aContent) \
{ \
return aContent->_check ? static_cast<const _class*>(aContent) : nullptr; \
} \
static _class* FromContentOrNull(nsIContent* aContent) \
{ \
return aContent ? FromContent(aContent) : nullptr; \
} \
static const _class* FromContentOrNull(const nsIContent* aContent) \
{ \
return aContent ? FromContent(aContent) : nullptr; \
}