Cosmetics. And avoid conversion of EmbeddedFile to FileName. That seems suspicious.

This may change shortly, anyway, though.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@23999 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2008-03-27 05:05:21 +00:00
parent 49ddf294a6
commit 09b189e74c

View File

@ -142,20 +142,20 @@ docstring complexLabel(Buffer const & buffer,
static CachedMap cached_keys; static CachedMap cached_keys;
// and cache the timestamp of the bibliography files. // and cache the timestamp of the bibliography files.
static map<FileName, time_t> bibfileStatus; static map<EmbeddedFile, time_t> bibfileStatus;
BiblioInfo biblist; BiblioInfo biblist;
EmbeddedFileList const & bibfilesCache = buffer.getBibfilesCache(); EmbeddedFileList const & bibfilesCache = buffer.getBibfilesCache();
// compare the cached timestamps with the actual ones. // compare the cached timestamps with the actual ones.
bool changed = false; bool changed = false;
for (EmbeddedFileList::const_iterator it = bibfilesCache.begin(); EmbeddedFileList::const_iterator ei = bibfilesCache.begin();
it != bibfilesCache.end(); ++ it) { EmbeddedFileList::const_iterator en = bibfilesCache.end();
FileName const f = *it; for (; ei != en; ++ ei) {
time_t lastw = f.lastModified(); time_t lastw = ei->lastModified();
if (lastw != bibfileStatus[f]) { if (lastw != bibfileStatus[*ei]) {
changed = true; changed = true;
bibfileStatus[f] = lastw; bibfileStatus[*ei] = lastw;
} }
} }