mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Avoid const casts by making mutable the usermacros member.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36984 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
12cc8a301d
commit
89c1d25250
@ -822,7 +822,7 @@ bool Buffer::readDocument(Lexer & lex)
|
||||
|
||||
// inform parent buffer about local macros
|
||||
if (parent()) {
|
||||
Buffer * pbuf = const_cast<Buffer *>(parent());
|
||||
Buffer const * pbuf = parent();
|
||||
UserMacroSet::const_iterator cit = usermacros.begin();
|
||||
UserMacroSet::const_iterator end = usermacros.end();
|
||||
for (; cit != end; ++cit)
|
||||
|
@ -544,7 +544,7 @@ public:
|
||||
|
||||
/// Collect user macro names at loading time
|
||||
typedef std::set<docstring> UserMacroSet;
|
||||
UserMacroSet usermacros;
|
||||
mutable UserMacroSet usermacros;
|
||||
|
||||
/// Replace the inset contents for insets which InsetCode is equal
|
||||
/// to the passed \p inset_code.
|
||||
|
@ -463,7 +463,7 @@ Buffer * InsetInclude::loadIfNeeded() const
|
||||
} else {
|
||||
// The file was already loaded, so, simply
|
||||
// inform parent buffer about local macros.
|
||||
Buffer * parent = const_cast<Buffer *>(&buffer());
|
||||
Buffer const * parent = &buffer();
|
||||
child->setParent(parent);
|
||||
MacroNameSet macros;
|
||||
child->listMacroNames(macros);
|
||||
|
Loading…
Reference in New Issue
Block a user