]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_atom.C
some (yet unfinished) up/down work
[lyx.git] / src / mathed / math_atom.C
index c77a1512eef3609eb3d6905587f0cb7fecb0963d..4b8259f1ff75e08b2f0906ac643ddd28a2100b54 100644 (file)
@@ -13,6 +13,7 @@
 #include "math_atom.h"
 #include "math_inset.h"
 
+using std::swap;
 
 
 MathAtom::MathAtom()
@@ -33,12 +34,13 @@ MathAtom::MathAtom(MathAtom const & at)
 }
 
 
-void MathAtom::operator=(MathAtom const & at)
+MathAtom & MathAtom::operator=(MathAtom const & at)
 {
        if (&at == this)
-               return;
+               return *this;
        MathAtom tmp(at);
-       std::swap(tmp.nucleus_, nucleus_);
+       swap(tmp.nucleus_, nucleus_);
+       return *this;
 }