summaryrefslogtreecommitdiff
path: root/starmath/inc
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2016-12-26 18:41:53 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2016-12-26 12:17:13 +0000
commitd6a7f7fe98af19b43d8e82555a10bf1e835d0533 (patch)
tree7dd690ad2d8fa1d4c4d09c65bdef3549fc123434 /starmath/inc
parentfd3d7a1f2c5bc817fd2473c71df1e6d1801dda99 (diff)
starmath: Prefix n to SmCaretPos's Index
Change-Id: Ie1647d8143c4c38ebcf5111bffc291c26704c4c0 Reviewed-on: https://gerrit.libreoffice.org/32428 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
Diffstat (limited to 'starmath/inc')
-rw-r--r--starmath/inc/caret.hxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/starmath/inc/caret.hxx b/starmath/inc/caret.hxx
index 08afcce5bcc1..113ab8fc843e 100644
--- a/starmath/inc/caret.hxx
+++ b/starmath/inc/caret.hxx
@@ -20,9 +20,10 @@
/** Representation of caret position with an equation */
struct SmCaretPos{
- SmCaretPos(SmNode* selectedNode = nullptr, int iIndex = 0) {
- pSelectedNode = selectedNode;
- Index = iIndex;
+ SmCaretPos(SmNode* selectedNode = nullptr, int iIndex = 0)
+ : pSelectedNode(selectedNode)
+ , nIndex(iIndex)
+ {
}
/** Selected node */
SmNode* pSelectedNode;
@@ -36,11 +37,11 @@ struct SmCaretPos{
*/
//TODO: Special cases for SmBlankNode is needed
//TODO: Consider forgetting about the todo above... As it's really unpleasant.
- int Index;
+ int nIndex;
/** True, if this is a valid caret position */
bool IsValid() const { return pSelectedNode != nullptr; }
bool operator==(const SmCaretPos &pos) const {
- return pos.pSelectedNode == pSelectedNode && Index == pos.Index;
+ return pos.pSelectedNode == pSelectedNode && nIndex == pos.nIndex;
}
/** Get the caret position after pNode, regardless of pNode
*