X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FModuleList.cpp;h=51a942776610d4cd131db854deb3f886b0b267d9;hb=04eef3480faffb98b87f23cf39c09f2bb3c71173;hp=6b693b16e624a93fa3c71651c9bb5d3ed1f2a63b;hpb=aafd52f44167d5510be1ddcb974daa9dae486933;p=lyx.git diff --git a/src/ModuleList.cpp b/src/ModuleList.cpp index 6b693b16e6..51a9427766 100644 --- a/src/ModuleList.cpp +++ b/src/ModuleList.cpp @@ -40,7 +40,7 @@ LyXModule::LyXModule(string const & n, string const & i, string const & c): name_(n), id_(i), description_(d), package_list_(p), required_modules_(r), excluded_modules_(e), category_(c), - checked_(false) + checked_(false), available_(false) { filename_ = id_ + ".module"; } @@ -48,21 +48,14 @@ LyXModule::LyXModule(string const & n, string const & i, vector LyXModule::prerequisites() const { -#ifdef TEX2LYX - return vector(); -#else if (!checked_) isAvailable(); return prerequisites_; -#endif } bool LyXModule::isAvailable() const { -#ifdef TEX2LYX - return true; -#else if (package_list_.empty()) return true; if (checked_) @@ -79,7 +72,6 @@ bool LyXModule::isAvailable() const } } return available_; -#endif } @@ -272,10 +264,10 @@ LyXModule * ModuleList::operator[](string const & str) LyXModuleList::iterator it = modlist_.begin(); for (; it != modlist_.end(); ++it) if (it->getID() == str) { - LyXModule & mod = *it; - return &mod; + LyXModule & mod = *it; + return &mod; } - return 0; + return 0; } } // namespace lyx