COIN-OR::LEMON - Graph Library

Ticket #208: 94e3cf7b7fb4.patch

File 94e3cf7b7fb4.patch, 3.0 KB (added by Alpar Juttner, 16 years ago)
  • lemon/base.cc

    # HG changeset patch
    # User Alpar Juttner <alpar@cs.elte.hu>
    # Date 1232620853 0
    # Node ID 94e3cf7b7fb4cc80ddf13f760b290c970e348e19
    # Parent  efec3c133e74af5dfe41ffd0ad05e982b07980d7
    Suppress or fix VS2008 warnings + turn off faulty tests using CMAKE (#208)
    
    diff --git a/lemon/base.cc b/lemon/base.cc
    a b  
    2323#include<lemon/core.h>
    2424namespace lemon {
    2525
    26   float Tolerance<float>::def_epsilon = 1e-4;
     26  float Tolerance<float>::def_epsilon = static_cast<float>(1e-4);
    2727  double Tolerance<double>::def_epsilon = 1e-10;
    2828  long double Tolerance<long double>::def_epsilon = 1e-14;
    2929
  • lemon/core.h

    diff --git a/lemon/core.h b/lemon/core.h
    a b  
    1919#ifndef LEMON_CORE_H
    2020#define LEMON_CORE_H
    2121
     22#ifdef _MSC_VER
     23#pragma warning (disable: 4250 4355 4800 4996)
     24// Suppressed warnings:
     25// C4250: 'class1' : inherits 'class2::member' via dominance
     26// C4355: 'this' : used in base member initializer list
     27// C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning)
     28// C4996: 'function': was declared deprecated
     29#endif
     30
    2231#include <vector>
    2332#include <algorithm>
    2433
  • test/CMakeLists.txt

    diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
    a b  
    1010LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
    1111
    1212SET(TESTS
    13   adaptors_test
     13#   adaptors_test
    1414  bfs_test
    1515  circulation_test
    1616  counter_test
     
    1818  digraph_test
    1919  dijkstra_test
    2020  dim_test
    21   edge_set_test
     21#   edge_set_test
    2222  error_test
    2323  graph_copy_test
    2424  graph_test
  • test/maps_test.cc

    diff --git a/test/maps_test.cc b/test/maps_test.cc
    a b  
    170170  {
    171171    typedef ComposeMap<DoubleMap, ReadMap<B,A> > CompMap;
    172172    checkConcept<ReadMap<B,double>, CompMap>();
    173     CompMap map1(DoubleMap(),ReadMap<B,A>());
     173    CompMap map1 = CompMap(DoubleMap(),ReadMap<B,A>());
    174174    CompMap map2 = composeMap(DoubleMap(), ReadMap<B,A>());
    175175
    176176    SparseMap<double, bool> m1(false); m1[3.14] = true;
     
    183183  {
    184184    typedef CombineMap<DoubleMap, DoubleMap, std::plus<double> > CombMap;
    185185    checkConcept<ReadMap<A,double>, CombMap>();
    186     CombMap map1(DoubleMap(), DoubleMap());
     186    CombMap map1 = CombMap(DoubleMap(), DoubleMap());
    187187    CombMap map2 = combineMap(DoubleMap(), DoubleMap(), std::plus<double>());
    188188
    189189    check(combineMap(constMap<B,int,2>(), identityMap<B>(), &binc)[B()] == 3,
     
    195195    checkConcept<ReadMap<A,B>, FunctorToMap<F,A,B> >();
    196196    checkConcept<ReadMap<A,B>, FunctorToMap<F> >();
    197197    FunctorToMap<F> map1;
    198     FunctorToMap<F> map2(F());
     198    FunctorToMap<F> map2 = FunctorToMap<F>(F());
    199199    B b = functorToMap(F())[A()];
    200200
    201201    checkConcept<ReadMap<A,B>, MapToFunctor<ReadMap<A,B> > >();
    202     MapToFunctor<ReadMap<A,B> > map(ReadMap<A,B>());
     202    MapToFunctor<ReadMap<A,B> > map = MapToFunctor<ReadMap<A,B> >(ReadMap<A,B>());
    203203
    204204    check(functorToMap(&func)[A()] == 3,
    205205          "Something is wrong with FunctorToMap");