From 689e54f34a4d735e6081b1b1ac8487bf028f3982 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Mon, 17 Nov 2014 11:52:14 +0100 Subject: [PATCH] Make sure that UpdateLocker is used correctly in the future --- src/mathed/MathMacro.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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, -- 2.39.2