mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 09:15:50 +00:00
Make static variable non-static
This is still a hack, but a less dangerous one. The old code had a problem if it was called from different threads, or if for some reason it would get called recursively.
This commit is contained in:
parent
520a2cb15e
commit
b59e1bd79b
@ -68,8 +68,7 @@ bool MacroData::expand(vector<MathData> const & args, MathData & to) const
|
||||
updateData();
|
||||
|
||||
// Hack. Any inset with a cell would do.
|
||||
static InsetMathSqrt inset(0);
|
||||
inset.setBuffer(const_cast<Buffer &>(*buffer_));
|
||||
InsetMathSqrt inset(const_cast<Buffer *>(buffer_));
|
||||
|
||||
docstring const & definition(display_.empty() ? definition_ : display_);
|
||||
asArray(definition, inset.cell(0));
|
||||
|
Loading…
Reference in New Issue
Block a user