]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_atom.C
Fix event loop to no longer eat CPU
[lyx.git] / src / mathed / math_atom.C
index 6706b33cbc1b6717399ac761a608a8940360d123..4b8259f1ff75e08b2f0906ac643ddd28a2100b54 100644 (file)
@@ -12,9 +12,8 @@
 
 #include "math_atom.h"
 #include "math_inset.h"
-#include "insets/insetbase.h"
 
-#include <utility>
+using std::swap;
 
 
 MathAtom::MathAtom()
@@ -35,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;
 }