]> git.lyx.org Git - features.git/commitdiff
Make sure that UpdateLocker is used correctly in the future
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 17 Nov 2014 10:52:14 +0000 (11:52 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 17 Nov 2014 10:52:14 +0000 (11:52 +0100)
src/mathed/MathMacro.cpp

index 941e29aee2437585e93ce815f29b77500017b258..38d07e6ef1efe447ecdb90235d158a5c53d65120 100644 (file)
@@ -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,