-LyXLayout_ptr const & LyXTextClass::getEnv(string const & name) const
-{
- lyx::Assert(!name.empty());
-
- if (name.empty())
- lyxerr << "LyXTextClass::getEnv() called with empty n" << endl;
-
- LayoutList::const_iterator cit =
- find_if(envlist_.begin(), envlist_.end(), compare_name(name));
-
- if (cit == envlist_.end()) {
- lyxerr << "We failed to find the environment '" << name
- << "' in the layout list. You MUST investigate!"
- << endl;
- // we require the name to exist
- lyx::Assert(false);
- }
-
- return *cit;
-}
-