mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 07:17:32 +09:00
Issue #1375 - Overload FromContent() to work with const
This commit is contained in:
parent
8e51f64cad
commit
484b481031
1 changed files with 8 additions and 0 deletions
|
|
@ -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; \
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue