summaryrefslogtreecommitdiff
path: root/starmath/inc/node.hxx
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2016-08-01 18:14:21 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2016-08-02 01:44:12 +0000
commit389b08190092f9a9103b3ac098994ec83b2d0bfa (patch)
treec7bc32223a7b667e044c9d17f8f831b16eb5eb36 /starmath/inc/node.hxx
parenta859c37ee0126e0daca711893da1cbf6138ec25b (diff)
starmath: SmVerticalBraceNode always has a triple of nodes
Moreover the middle ("Brace") node is a SmMathSymbolNode. Change-Id: Ia0e4f798b69a9a205269bbd3f6c63d2059e8c766 Reviewed-on: https://gerrit.libreoffice.org/27769 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'starmath/inc/node.hxx')
-rw-r--r--starmath/inc/node.hxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/starmath/inc/node.hxx b/starmath/inc/node.hxx
index 3511d71f395a..a2b50d7d0127 100644
--- a/starmath/inc/node.hxx
+++ b/starmath/inc/node.hxx
@@ -1369,7 +1369,7 @@ inline const SmMathSymbolNode* SmBraceNode::ClosingBrace() const
inline SmNode* SmVerticalBraceNode::Body()
{
- OSL_ASSERT( GetNumSubNodes() > 0 );
+ assert( GetNumSubNodes() == 3 );
return GetSubNode( 0 );
}
inline const SmNode* SmVerticalBraceNode::Body() const
@@ -1378,7 +1378,8 @@ inline const SmNode* SmVerticalBraceNode::Body() const
}
inline SmMathSymbolNode* SmVerticalBraceNode::Brace()
{
- OSL_ASSERT( GetNumSubNodes() > 1 && GetSubNode( 1 )->GetType() == NMATH );
+ assert( GetNumSubNodes() == 3 );
+ assert( GetSubNode( 1 )->GetType() == NMATH );
return static_cast< SmMathSymbolNode* >( GetSubNode( 1 ));
}
inline const SmMathSymbolNode* SmVerticalBraceNode::Brace() const
@@ -1387,7 +1388,7 @@ inline const SmMathSymbolNode* SmVerticalBraceNode::Brace() const
}
inline SmNode* SmVerticalBraceNode::Script()
{
- OSL_ASSERT( GetNumSubNodes() > 2 );
+ assert( GetNumSubNodes() == 3 );
return GetSubNode( 2 );
}
inline const SmNode* SmVerticalBraceNode::Script() const