summaryrefslogtreecommitdiff
path: root/starmath/inc
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2016-08-08 14:36:15 +0900
committerCaolán McNamara <caolanm@redhat.com>2016-08-08 11:41:25 +0000
commit450a8ee1f49ca32184103a7ddc579351cfc24a6d (patch)
tree21c142f91419d425349525e7ad161b2dd50d8555 /starmath/inc
parentf60eaab748add19683e66c7e4bc073c9ce7887f7 (diff)
starmath: SmBraceNode always has 3 children
Change-Id: I53ef8c215866fc45ee82b6805c41c93da0e024b7 Reviewed-on: https://gerrit.libreoffice.org/27980 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'starmath/inc')
-rw-r--r--starmath/inc/node.hxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index a57922175b94..1e61304281c4 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -1342,7 +1342,8 @@ inline const SmNode* SmAttributNode::Body() const
inline SmMathSymbolNode* SmBraceNode::OpeningBrace()
{
- OSL_ASSERT( GetNumSubNodes() > 0 && GetSubNode( 0 )->GetType() == NMATH );
+ assert( GetNumSubNodes() == 3 );
+ assert( GetSubNode( 0 )->GetType() == NMATH );
return static_cast< SmMathSymbolNode* >( GetSubNode( 0 ));
}
inline const SmMathSymbolNode* SmBraceNode::OpeningBrace() const
@@ -1351,7 +1352,7 @@ inline const SmMathSymbolNode* SmBraceNode::OpeningBrace() const
}
inline SmNode* SmBraceNode::Body()
{
- OSL_ASSERT( GetNumSubNodes() > 1 );
+ assert( GetNumSubNodes() == 3 );
return GetSubNode( 1 );
}
inline const SmNode* SmBraceNode::Body() const
@@ -1360,7 +1361,8 @@ inline const SmNode* SmBraceNode::Body() const
}
inline SmMathSymbolNode* SmBraceNode::ClosingBrace()
{
- OSL_ASSERT( GetNumSubNodes() > 2 && GetSubNode( 2 )->GetType() == NMATH );
+ assert( GetNumSubNodes() == 3 );
+ assert( GetSubNode( 2 )->GetType() == NMATH );
return static_cast< SmMathSymbolNode* >( GetSubNode( 2 ));
}
inline const SmMathSymbolNode* SmBraceNode::ClosingBrace() const