Make sure that UpdateLocker is used correctly in the future

This commit is contained in:
Jean-Marc Lasgouttes 2014-11-17 11:52:14 +01:00
parent e4fb40b284
commit 689e54f34a

View File

@ -326,6 +326,13 @@ public:
private: private:
MathMacro & mac; 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, void MathMacro::updateRepresentation(Cursor * cur, MacroContext const & mc,