COIN-OR::LEMON - Graph Library

Ignore:
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r1313 r1327  
    11CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
    22
    3 CMAKE_POLICY(SET CMP0048 OLD)
     3IF(POLICY CMP0048)
     4  CMAKE_POLICY(SET CMP0048 OLD)
     5ENDIF(POLICY CMP0048)
    46
    57SET(PROJECT_NAME "LEMON")
     
    149151  ELSEIF(MSVC)
    150152    # This part is unnecessary 'casue the same is set by the lemon/core.h.
    151     # Still keep it as an example.
    152     SET(CXX_WARNING "/wd4250 /wd4355 /wd4503 /wd4800 /wd4996")
     153    # Still kept as an example.
     154
     155    # SET(CXX_WARNING "/wd4250 /wd4267 /wd4355 /wd4503 /wd4800 /wd4996")
     156
    153157    # Suppressed warnings:
    154158    # C4250: 'class1' : inherits 'class2::member' via dominance
     159    # C4267: conversion from 'size_t' to 'type', possible loss of data
    155160    # C4355: 'this' : used in base member initializer list
    156161    # C4503: 'function' : decorated name length exceeded, name was truncated
     
    167172
    168173IF(MSVC)
     174  SET(CMAKE_CXX_FLAGS "/bigobj ${CMAKE_CXX_FLAGS}")
    169175  SET( CMAKE_CXX_FLAGS_MAINTAINER "/WX ${CMAKE_CXX_FLAGS_DEBUG}" CACHE STRING
    170176    "Flags used by the C++ compiler during maintainer builds."
  • lemon/arg_parser.h

    r959 r1327  
    2727#include <sstream>
    2828#include <algorithm>
     29#include <lemon/core.h>
    2930#include <lemon/assert.h>
    3031
  • lemon/core.h

    r1270 r1327  
    3030// Disable the following warnings when compiling with MSVC:
    3131// C4250: 'class1' : inherits 'class2::member' via dominance
     32// C4267: conversion from 'size_t' to 'type', possible loss of data
    3233// C4355: 'this' : used in base member initializer list
    3334// C4503: 'function' : decorated name length exceeded, name was truncated
     
    3536// C4996: 'function': was declared deprecated
    3637#ifdef _MSC_VER
    37 #pragma warning( disable : 4250 4355 4503 4800 4996 )
     38#pragma warning( disable : 4250 4267 4355 4503 4800 4996 )
    3839#endif
    3940
    40 #ifdef __GNUC__
    41 #define GCC_VERSION (__GNUC__ * 10000                   \
    42                      + __GNUC_MINOR__ * 100             \
    43                      + __GNUC_PATCHLEVEL__)
    44 #endif
    45 
    46 #if GCC_VERSION >= 40800
     41#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)
    4742// Needed by the [DI]GRAPH_TYPEDEFS marcos for gcc 4.8
    4843#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
  • lemon/counter.h

    r833 r1327  
    2222#include <string>
    2323#include <iostream>
     24
     25#include <lemon/core.h>
    2426
    2527///\ingroup timecount
  • lemon/elevator.h

    r628 r1328  
    168168    int onLevel(int l) const
    169169    {
    170       return _first[l+1]-_first[l];
     170      return static_cast<int>(_first[l+1]-_first[l]);
    171171    }
    172172    ///Return true if level \c l is empty.
     
    178178    int aboveLevel(int l) const
    179179    {
    180       return _first[_max_level+1]-_first[l+1];
     180      return static_cast<int>(_first[_max_level+1]-_first[l+1]);
    181181    }
    182182    ///Return the number of active items on level \c l.
    183183    int activesOnLevel(int l) const
    184184    {
    185       return _last_active[l]-_first[l]+1;
     185      return static_cast<int>(_last_active[l]-_first[l]+1);
    186186    }
    187187    ///Return true if there is no active item on level \c l.
  • lemon/lp.h

    r1306 r1323  
    2323
    2424
    25 #ifdef LEMON_HAVE_GLPK
     25#if LEMON_DEFAULT_LP == _LEMON_GLPK || LEMON_DEFAULT_MIP == _LEMON_GLPK
    2626#include <lemon/glpk.h>
    27 #elif LEMON_HAVE_CPLEX
     27#endif
     28#if LEMON_DEFAULT_LP == _LEMON_CPLEX || LEMON_DEFAULT_MIP == _LEMON_CPLEX
    2829#include <lemon/cplex.h>
    29 #elif LEMON_HAVE_SOPLEX
     30#endif
     31#if LEMON_DEFAULT_LP == _LEMON_SOPLEX
    3032#include <lemon/soplex.h>
    31 #elif LEMON_HAVE_CLP
     33#endif
     34#if LEMON_DEFAULT_LP == _LEMON_CLP
    3235#include <lemon/clp.h>
    33 #elif LEMON_HAVE_CBC
     36#endif
     37#if LEMON_DEFAULT_MIP == _LEMON_CBC
    3438#include <lemon/cbc.h>
    3539#endif
  • lemon/radix_sort.h

    r1270 r1328  
    329329      Allocator allocator;
    330330
    331       int length = std::distance(first, last);
     331      int length = static_cast<int>(std::distance(first, last));
    332332      Key* buffer = allocator.allocate(2 * length);
    333333      try {
  • lemon/random.h

    r631 r1328  
    200200        initState(init);
    201201
    202         num = length > end - begin ? length : end - begin;
     202        num = static_cast<int>(length > end - begin ? length : end - begin);
    203203        while (num--) {
    204204          curr[0] = (curr[0] ^ ((curr[1] ^ (curr[1] >> (bits - 2))) * mul1))
     
    214214        }
    215215
    216         num = length - 1; cnt = length - (curr - state) - 1;
     216        num = length - 1; cnt = static_cast<int>(length - (curr - state) - 1);
    217217        while (num--) {
    218218          curr[0] = (curr[0] ^ ((curr[1] ^ (curr[1] >> (bits - 2))) * mul2))
  • lemon/static_graph.h

    r956 r1328  
    204204
    205205      node_num = n;
    206       arc_num = std::distance(first, last);
     206      arc_num = static_cast<int>(std::distance(first, last));
    207207
    208208      node_first_out = new int[node_num + 1];
Note: See TracChangeset for help on using the changeset viewer.