commit 689e54f34a4d735e6081b1b1ac8487bf028f3982
Author: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date:   Mon Nov 17 11:52:14 2014 +0100

    Make sure that UpdateLocker is used correctly in the future

diff --git a/src/mathed/MathMacro.cpp b/src/mathed/MathMacro.cpp
index 941e29a..38d07e6 100644
--- a/src/mathed/MathMacro.cpp
+++ b/src/mathed/MathMacro.cpp
@@ -326,6 +326,13 @@ public:
 private:
        MathMacro & mac;
 };
+/** Avoid wrong usage of UpdateLocker.
+    To avoid wrong usage:
+    UpdateLocker(...); // wrong
+    UpdateLocker locker(...); // right
+*/
+#define UpdateLocker(x) unnamed_UpdateLocker;
+// Tip gotten from Bobby Schmidt's column in C/C++ Users Journal
 
 
 void MathMacro::updateRepresentation(Cursor * cur, MacroContext const & mc,

Reply via email to