Kill warning and avoid double arithmetic. Vincent, I hope I did not break something...

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33048 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2010-01-15 16:32:05 +00:00
parent ad55d4631f
commit acefad32e4

View File

@ -22,8 +22,6 @@
#include <boost/next_prior.hpp>
#include <cmath>
using namespace std;
using namespace lyx::support;
@ -625,9 +623,10 @@ int Compare::Impl::findMiddleSnake(DocRangePair const & rp,
ors.reset(DocIterator());
nrs.reset(DocIterator());
// In the formula below, the "+ 1" ensures we round like ceil()
int const D_max = (M_ + N_ + 1)/2;
// D is the number of horizontal and vertical steps, i.e.
// different characters in the old and new chunk.
int const D_max = ceil(((double)M_ + N_)/2);
for (int D = 0; D <= D_max; ++D) {
// to be used in the status messages
D_ = D;