lyxerr << "Operator[] called with empty n" << endl;
string const name = (n.empty() ? defaultLayoutName() : n);
+
+ static string lastLayoutName;
+ static LayoutList::difference_type lastLayoutIndex;
+
+ if (name == lastLayoutName)
+ return layoutlist[lastLayoutIndex];
+
LayoutList::const_iterator cit =
find_if(layoutlist.begin(),
lyx::Assert(false);
}
+ lastLayoutName = name;
+ lastLayoutIndex = std::distance(layoutlist.begin(), cit);
+
return *cit;
}