#include "ModuleList.h"
#include "support/debug.h"
-#include "support/lyxalgo.h"
+#include <algorithm>
#include <string>
#include <vector>
// moment. (Thanks to Philippe Charpentier for helping work out all
// the bugs---rgh.)
bool LayoutModuleList::adaptToBaseClass(LayoutFile const * const lay,
- std::list<string> removedModules)
+ std::list<string> const & removedModules)
{
// first, we remove any modules the new document class itself provides,
// those it excludes, and those that conflict with ones it excludes.
// 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;
}
// 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();