From: Jean-Marc Lasgouttes Date: Mon, 17 Nov 2014 10:52:14 +0000 (+0100) Subject: Make sure that UpdateLocker is used correctly in the future X-Git-Tag: 2.2.0alpha1~1533 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=689e54f34a4d735e6081b1b1ac8487bf028f3982;p=features.git Make sure that UpdateLocker is used correctly in the future --- diff --git a/src/mathed/MathMacro.cpp b/src/mathed/MathMacro.cpp index 941e29aee2..38d07e6ef1 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,