]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_atom.C
Make Helge happy: no more crash on arrow up/down in math macro
[lyx.git] / src / mathed / math_atom.C
index 4ae004f521691bb809b26d4f3795fbbd9838b8f0..4b8259f1ff75e08b2f0906ac643ddd28a2100b54 100644 (file)
@@ -1,24 +1,19 @@
-/*
- *  File:        math_atom.C
- *  Purpose:     Wrapper for MathInset *
- *  Author:      André Pönitz
- *  Created:     July 2001
+/**
+ * \file math_atom.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *  Copyright: 2001 The LyX team
+ * \author André Pönitz
  *
- *   Version: 1.2.0
- *
- *   You are free to use and modify this code under the terms of
- *   the GNU General Public Licence version 2 or later.
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
 #include "math_atom.h"
 #include "math_inset.h"
-#include "insets/insetbase.h"
 
-#include <utility>
+using std::swap;
 
 
 MathAtom::MathAtom()
@@ -39,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;
 }