[Lemon-commits] Alpar Juttner: Resolve several MSVC related comp...
Lemon HG
hg at lemon.cs.elte.hu
Tue Apr 22 18:59:40 CEST 2008
details: http://lemon.cs.elte.hu/hg/lemon/rev/c3b45bb643b0
changeset: 143:c3b45bb643b0
user: Alpar Juttner <alpar [at] cs.elte.hu>
date: Tue Apr 22 17:12:40 2008 +0100
description:
Resolve several MSVC related compilation problems
diffstat:
3 files changed, 6 insertions(+), 1 deletion(-)
demo/lgf_demo.cc | 2 +-
lemon/graph_to_eps.h | 2 ++
lemon/time_measure.h | 3 +++
diffs (44 lines):
diff -r 8b703d177341 -r c3b45bb643b0 demo/lgf_demo.cc
--- a/demo/lgf_demo.cc Sun Apr 13 20:15:45 2008 +0200
+++ b/demo/lgf_demo.cc Tue Apr 22 17:12:40 2008 +0100
@@ -37,7 +37,7 @@
int main(int argc, const char *argv[]) {
const int n = argc > 1 ? std::atoi(argv[1]) : 20;
- const int e = argc > 2 ? std::atoi(argv[2]) : static_cast<int>(n * log(n));
+ const int e = argc > 2 ? std::atoi(argv[2]) : static_cast<int>(n * std::log(double(n)));
const int m = argc > 3 ? std::atoi(argv[3]) : 100;
SmartDigraph digraph;
diff -r 8b703d177341 -r c3b45bb643b0 lemon/graph_to_eps.h
--- a/lemon/graph_to_eps.h Sun Apr 13 20:15:45 2008 +0200
+++ b/lemon/graph_to_eps.h Tue Apr 22 17:12:40 2008 +0100
@@ -29,6 +29,8 @@
#include<sys/time.h>
#include<ctime>
#else
+#define WIN32_LEAN_AND_MEAN
+#define NOMINMAX
#include<windows.h>
#endif
diff -r 8b703d177341 -r c3b45bb643b0 lemon/time_measure.h
--- a/lemon/time_measure.h Sun Apr 13 20:15:45 2008 +0200
+++ b/lemon/time_measure.h Tue Apr 22 17:12:40 2008 +0100
@@ -24,6 +24,8 @@
///\brief Tools for measuring cpu usage
#ifdef WIN32
+#define WIN32_LEAN_AND_MEAN
+#define NOMINMAX
#include <windows.h>
#include <cmath>
#else
@@ -31,6 +33,7 @@
#include <sys/time.h>
#endif
+#include <string>
#include <fstream>
#include <iostream>
More information about the Lemon-commits
mailing list