COIN-OR::LEMON - Graph Library

Changeset 963:761fe0846f49 in lemon-1.2 for test/maps_test.cc


Ignore:
Timestamp:
09/13/12 11:45:36 (12 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Children:
964:7fdaa05a69a1, 967:c5990f454032
Phase:
public
Message:

Fix clang compilation warnings and errors (#449)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/maps_test.cc

    r684 r963  
    7979    NullMap<A,B> map1;
    8080    NullMap<A,B> map2 = map1;
     81    ignore_unused_variable_warning(map2);
    8182    map1 = nullMap<A,B>();
    8283  }
     
    8990    ConstMap<A,B> map2 = B();
    9091    ConstMap<A,B> map3 = map1;
     92    ignore_unused_variable_warning(map2,map3);
     93
    9194    map1 = constMap<A>(B());
    9295    map1 = constMap<A,B>();
     
    9497    ConstMap<A,C> map4(C(1));
    9598    ConstMap<A,C> map5 = map4;
     99    ignore_unused_variable_warning(map5);
     100
    96101    map4 = constMap<A>(C(2));
    97102    map4.setAll(C(3));
     
    114119    IdentityMap<A> map1;
    115120    IdentityMap<A> map2 = map1;
     121    ignore_unused_variable_warning(map2);
     122
    116123    map1 = identityMap<A>();
    117124
     
    173180    checkConcept<ReadMap<B,double>, CompMap>();
    174181    CompMap map1 = CompMap(DoubleMap(),ReadMap<B,A>());
     182    ignore_unused_variable_warning(map1);
    175183    CompMap map2 = composeMap(DoubleMap(), ReadMap<B,A>());
     184    ignore_unused_variable_warning(map2);
    176185
    177186    SparseMap<double, bool> m1(false); m1[3.14] = true;
     
    186195    checkConcept<ReadMap<A,double>, CombMap>();
    187196    CombMap map1 = CombMap(DoubleMap(), DoubleMap());
     197    ignore_unused_variable_warning(map1);
    188198    CombMap map2 = combineMap(DoubleMap(), DoubleMap(), std::plus<double>());
     199    ignore_unused_variable_warning(map2);
    189200
    190201    check(combineMap(constMap<B,int,2>(), identityMap<B>(), &binc)[B()] == 3,
     
    198209    FunctorToMap<F> map1;
    199210    FunctorToMap<F> map2 = FunctorToMap<F>(F());
     211    ignore_unused_variable_warning(map2);
     212
    200213    B b = functorToMap(F())[A()];
     214    ignore_unused_variable_warning(b);
    201215
    202216    checkConcept<ReadMap<A,B>, MapToFunctor<ReadMap<A,B> > >();
    203     MapToFunctor<ReadMap<A,B> > map = MapToFunctor<ReadMap<A,B> >(ReadMap<A,B>());
     217    MapToFunctor<ReadMap<A,B> > map =
     218      MapToFunctor<ReadMap<A,B> >(ReadMap<A,B>());
     219    ignore_unused_variable_warning(map);
    204220
    205221    check(functorToMap(&func)[A()] == 3,
     
    219235      ConvertMap<ReadMap<double, int>, double> >();
    220236    ConvertMap<RangeMap<bool>, int> map1(rangeMap(1, true));
     237    ignore_unused_variable_warning(map1);
    221238    ConvertMap<RangeMap<bool>, int> map2 = convertMap<int>(rangeMap(2, false));
     239    ignore_unused_variable_warning(map2);
     240
    222241  }
    223242
Note: See TracChangeset for help on using the changeset viewer.