X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLayoutModuleList.cpp;h=83c51fb96764328c07e4d3ded9b97005795c4bd3;hb=55a3dd7b346d29a52ba305a4558e9e380ef50f47;hp=929dfcb549a29815defbd9f225e9124e399062a1;hpb=2bab705f62f177ce735dd8e90d58f01a0f031c17;p=lyx.git diff --git a/src/LayoutModuleList.cpp b/src/LayoutModuleList.cpp index 929dfcb549..83c51fb967 100644 --- a/src/LayoutModuleList.cpp +++ b/src/LayoutModuleList.cpp @@ -17,8 +17,8 @@ #include "ModuleList.h" #include "support/debug.h" -#include "support/lyxalgo.h" +#include #include #include @@ -35,7 +35,7 @@ namespace lyx { // moment. (Thanks to Philippe Charpentier for helping work out all // the bugs---rgh.) bool LayoutModuleList::adaptToBaseClass(LayoutFile const * const lay, - std::list removedModules) + std::list const & removedModules) { // first, we remove any modules the new document class itself provides, // those it excludes, and those that conflict with ones it excludes. @@ -48,7 +48,7 @@ bool LayoutModuleList::adaptToBaseClass(LayoutFile const * const lay, // loaded modules. it's a hassle that we have to do this now, since // we just went through them a bit ago, but things might have changed // with the loading of the default modules. - retval |= checkModuleConsistency(lay); + retval = (checkModuleConsistency(lay) || retval); return retval; } @@ -63,7 +63,7 @@ bool LayoutModuleList::moduleCanBeAdded(string const & modName, if (*it == modName) return false; - LyXModule const * const lm = moduleList[modName]; + LyXModule const * const lm = theModuleList[modName]; if (!lm) return true; @@ -192,7 +192,7 @@ bool LayoutModuleList::removeBadModules(LayoutFile const * const lay) for (; !excluded && pit != pen; ++pit) { if (!LyXModule::areCompatible(modname, *pit)) { LYXERR0("Module " << modname << - " dropped becuase it conflicts with provided module `" << *pit << "'."); + " dropped because it conflicts with provided module `" << *pit << "'."); consistent = false; excluded = true; } @@ -208,7 +208,8 @@ bool LayoutModuleList::removeBadModules(LayoutFile const * const lay) // Perform a consistency check on the set of modules. We need to make // sure that none of the modules exclude each other and that requires // are satisfied. -bool LayoutModuleList::checkModuleConsistency(LayoutFile const * const lay) { +bool LayoutModuleList::checkModuleConsistency(LayoutFile const * const lay) +{ bool consistent = true; LayoutModuleList oldModules = *this; clear(); @@ -235,7 +236,7 @@ bool LayoutModuleList::checkModuleConsistency(LayoutFile const * const lay) { // determine whether some provided module or some prior module // satisfies our requirements - LyXModule const * const oldmod = moduleList[modname]; + LyXModule const * const oldmod = theModuleList[modname]; if (!oldmod) { LYXERR0("Default module " << modname << " added although it is unavailable and can't check requirements.");