mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-01 21:45:23 +00:00
Make sure that UpdateLocker is used correctly in the future
This commit is contained in:
parent
e4fb40b284
commit
689e54f34a
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user