#include "TextCache.h"
#include "buffer.h"
#include "bufferlist.h"
+#include "debug.h"
using std::ostream;
using std::for_each;
Cache::iterator it = find_if(cache.begin(), cache.end(),
text_fits(b, p));
if (it != cache.end()) {
- LyXText * tmp = (*it).second.second;
+ LyXText * tmp = it->second.second;
cache.erase(it);
return tmp;
}
void TextCache::add(Buffer * buf, int workwidth, LyXText * text)
{
- lyxerr.debug() << "TextCache::add " << text;
+ lyxerr[Debug::INFO] << "TextCache::add " << text;
if (bufferlist.isLoaded(buf)) {
cache[buf] = make_pair(workwidth, text);
- lyxerr.debug() << " added" << endl;
+ lyxerr[Debug::INFO] << " added" << endl;
} else {
delete text;
- lyxerr.debug() << " deleted" << endl;
+ lyxerr[Debug::INFO] << " deleted" << endl;
}
}