X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FTextCache.C;h=6b3d9b4b832cecf651d6584cb91b968693ed618f;hb=757e2c55d8c15db0db5b4127bb3f6f22e4d7d81b;hp=28f956499bcf3b40c707aff65b12e3e9a39e628b;hpb=f879ff4b474857a3458f3ec24ab8b108a1d88b63;p=lyx.git diff --git a/src/TextCache.C b/src/TextCache.C index 28f956499b..6b3d9b4b83 100644 --- a/src/TextCache.C +++ b/src/TextCache.C @@ -21,6 +21,7 @@ #include "TextCache.h" #include "buffer.h" #include "bufferlist.h" +#include "debug.h" using std::ostream; using std::for_each; @@ -75,7 +76,7 @@ LyXText * TextCache::findFit(Buffer * b, int p) 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; } @@ -99,13 +100,13 @@ void TextCache::show(ostream & os, TextCache::value_type const & vt) 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; } }