BufferList::exists(): use FileName::operator==() instead of string comparison.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25957 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2008-07-29 08:05:01 +00:00
parent 3f8d273b93
commit d1d7252c46

View File

@ -276,12 +276,10 @@ docstring BufferList::emergencyWrite(Buffer * buf)
bool BufferList::exists(FileName const & fname) const
{
//FIXME: use Buffer::fileName()!
string const s = fname.absFilename();
return find_if(bstore.begin(), bstore.end(),
bind(equal_to<string>(),
bind(&Buffer::absFileName, _1),
s))
bind(equal_to<FileName>(),
bind(&Buffer::fileName, _1),
fname))
!= bstore.end();
}