mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
compile fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23169 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
8e9410b3d0
commit
30fff63257
@ -421,27 +421,12 @@ void handle_comment(ostream & os, string const & s, Context & context)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class isLayout : public unary_function<LayoutPtr, bool> {
|
LayoutPtr findLayout(TextClass const & textclass, string const & name)
|
||||||
public:
|
|
||||||
isLayout(string const name) : name_(name) {}
|
|
||||||
bool operator()(LayoutPtr const & ptr) const {
|
|
||||||
return ptr->latexname() == name_;
|
|
||||||
}
|
|
||||||
private:
|
|
||||||
string const name_;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
LayoutPtr findLayout(TextClass const & textclass,
|
|
||||||
string const & name)
|
|
||||||
{
|
{
|
||||||
TextClass::const_iterator beg = textclass.begin();
|
for (size_t i = 0; i != textclass.layoutCount(); ++i)
|
||||||
TextClass::const_iterator end = textclass.end();
|
if (textclass.layout(i)->latexname() == name)
|
||||||
|
return textclass.layout(i);
|
||||||
TextClass::const_iterator
|
return LayoutPtr();
|
||||||
it = find_if(beg, end, isLayout(name));
|
|
||||||
|
|
||||||
return (it == end) ? LayoutPtr() : *it;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user