#include "support/debug.h"
#include "support/lassert.h"
#include "support/lstrings.h"
+#include "support/lyxlib.h"
#include <algorithm>
#include <ostream>
x += cit->full_width();
++cit;
}
- return int(x + 0.5);
+ return support::iround(x);
}
else
break;
}
- return int(x + 0.5);
+ return support::iround(x);
}
#include <config.h>
#include "Spacing.h"
-#include "support/lstrings.h"
#include "support/convert.h"
+#include "support/lstrings.h"
+#include "support/lyxlib.h"
#include <ostream>
{
space = sp;
if (sp == Other) {
- switch (int(convert<double>(val) * 1000 + 0.5)) {
+ switch (support::iround(convert<double>(val) * 1000)) {
case 1000:
space = Single;
break;
#include "PreviewLoader.h"
#include "support/FileName.h"
+#include "support/lyxlib.h"
using namespace std;
if (!image)
return dim;
- dim.asc = int(pimpl_->ascent_frac_ * double(image->height()) + 0.5);
+ dim.asc = support::iround(pimpl_->ascent_frac_ * double(image->height()));
dim.des = image->height() - dim.asc;
dim.wid = image->width();
return dim;