[Lemon-commits] Alpar Juttner: Resolve VS and MinGW warnings (#595)
Lemon HG
hg at lemon.cs.elte.hu
Tue Apr 28 18:14:01 CEST 2015
details: http://lemon.cs.elte.hu/hg/lemon/rev/c199e9976d93
changeset: 1341:c199e9976d93
user: Alpar Juttner <alpar [at] cs.elte.hu>
date: Tue Apr 28 18:07:44 2015 +0200
description:
Resolve VS and MinGW warnings (#595)
diffstat:
lemon/bits/windows.cc | 4 ++++
lemon/core.h | 28 +++++++++++++++-------------
test/radix_sort_test.cc | 2 ++
3 files changed, 21 insertions(+), 13 deletions(-)
diffs (71 lines):
diff --git a/lemon/bits/windows.cc b/lemon/bits/windows.cc
--- a/lemon/bits/windows.cc
+++ b/lemon/bits/windows.cc
@@ -21,6 +21,10 @@
#include<lemon/bits/windows.h>
+#if defined(LEMON_WIN32) && defined(__GNUC__)
+#pragma GCC diagnostic ignored "-Wold-style-cast"
+#endif
+
#ifdef LEMON_WIN32
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
diff --git a/lemon/core.h b/lemon/core.h
--- a/lemon/core.h
+++ b/lemon/core.h
@@ -19,13 +19,12 @@
#ifndef LEMON_CORE_H
#define LEMON_CORE_H
-#include <vector>
-#include <algorithm>
-
-#include <lemon/config.h>
-#include <lemon/bits/enable_if.h>
-#include <lemon/bits/traits.h>
-#include <lemon/assert.h>
+///\file
+///\brief LEMON core utilities.
+///
+///This header file contains core utilities for LEMON.
+///It is automatically included by all graph types, therefore it usually
+///do not have to be included directly.
// Disable the following warnings when compiling with MSVC:
// C4250: 'class1' : inherits 'class2::member' via dominance
@@ -43,12 +42,15 @@
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#endif
-///\file
-///\brief LEMON core utilities.
-///
-///This header file contains core utilities for LEMON.
-///It is automatically included by all graph types, therefore it usually
-///do not have to be included directly.
+#include <vector>
+#include <algorithm>
+
+#include <lemon/config.h>
+#include <lemon/bits/enable_if.h>
+#include <lemon/bits/traits.h>
+#include <lemon/assert.h>
+
+
namespace lemon {
diff --git a/test/radix_sort_test.cc b/test/radix_sort_test.cc
--- a/test/radix_sort_test.cc
+++ b/test/radix_sort_test.cc
@@ -16,6 +16,8 @@
*
*/
+#include <lemon/core.h>
+
#include <lemon/time_measure.h>
#include <lemon/smart_graph.h>
#include <lemon/maps.h>
More information about the Lemon-commits
mailing list