]> git.lyx.org Git - lyx.git/blobdiff - src/ConverterCache.cpp
Avoid full metrics computation with Update:FitCursor
[lyx.git] / src / ConverterCache.cpp
index bee02536524e2d13de84a30d9ea25b7f691d7bfe..86c5764801c5be1848201b4671230be6b922fdd0 100644 (file)
 #include "ConverterCache.h"
 
 #include "Format.h"
-#include "Lexer.h"
 #include "LyXRC.h"
 #include "Mover.h"
 
 #include "support/convert.h"
 #include "support/debug.h"
 #include "support/filetools.h"
+#include "support/Lexer.h"
 #include "support/lyxtime.h"
 #include "support/Package.h"
 
+#include "support/checksum.h"
 #include "support/lassert.h"
-#include <boost/crc.hpp>
 
 #include <algorithm>
 #include <fstream>
@@ -41,14 +41,6 @@ namespace lyx {
 
 namespace {
 
-unsigned long do_crc(string const & s)
-{
-       boost::crc_32_type crc;
-       crc = for_each(s.begin(), s.end(), crc);
-       return crc.checksum();
-}
-
-
 // FIXME THREAD
 // This should be OK because it is only assigned during init()
 static FileName cache_dir;
@@ -62,7 +54,8 @@ public:
                : timestamp(t), checksum(c)
        {
                ostringstream os;
-               os << setw(10) << setfill('0') << do_crc(orig_from.absFileName())
+               os << setw(10) << setfill('0')
+                  << support::checksum(orig_from.absFileName())
                   << '-' << to_format;
                cache_name = FileName(addName(cache_dir.absFileName(), os.str()));
                LYXERR(Debug::FILES, "Add file cache item " << orig_from