diff options
-rw-r--r-- | starmath/inc/caret.hxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/starmath/inc/caret.hxx b/starmath/inc/caret.hxx index bb1fc840d385..5b9076baa695 100644 --- a/starmath/inc/caret.hxx +++ b/starmath/inc/caret.hxx @@ -36,10 +36,10 @@ struct SmCaretPos{ int Index; /** True, if this is a valid caret position */ bool IsValid() const { return pSelectedNode != nullptr; } - bool operator!=(SmCaretPos pos) const { + bool operator!=(const SmCaretPos &pos) const { return pos.pSelectedNode != pSelectedNode || Index != pos.Index; } - bool operator==(SmCaretPos pos) const { + bool operator==(const SmCaretPos &pos) const { return pos.pSelectedNode == pSelectedNode && Index == pos.Index; } /** Get the caret position after pNode, regardless of pNode |