COIN-OR::LEMON - Graph Library

Changeset 2386:81b47fc5c444 in lemon-0.x for lemon/bits/variant.h


Ignore:
Timestamp:
03/02/07 19:04:28 (17 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3217
Message:

Hard Warning checking

  • based on the remark of the ZIB user
  • we do not use -Winline
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/bits/variant.h

    r2292 r2386  
    7474    /// This constructor initalizes to the given value of the \c First
    7575    /// type.
    76     BiVariant(const First& first) {
     76    BiVariant(const First& f) {
    7777      flag = true;
    78       new(reinterpret_cast<First*>(data)) First(first);
     78      new(reinterpret_cast<First*>(data)) First(f);
    7979    }
    8080
     
    8383    /// This constructor initalizes to the given value of the \c
    8484    /// Second type.
    85     BiVariant(const Second& second) {
     85    BiVariant(const Second& s) {
    8686      flag = false;
    87       new(reinterpret_cast<Second*>(data)) Second(second);
     87      new(reinterpret_cast<Second*>(data)) Second(s);
    8888    }
    8989
     
    122122    /// This function sets the variant to the given value of the \c
    123123    /// First type.
    124     BiVariant& setFirst(const First& first) {
     124    BiVariant& setFirst(const First& f) {
    125125      destroy();
    126126      flag = true;
    127       new(reinterpret_cast<First*>(data)) First(first);   
     127      new(reinterpret_cast<First*>(data)) First(f);   
    128128      return *this;
    129129    }
     
    144144    /// This function sets the variant to the given value of the \c
    145145    /// Second type.
    146     BiVariant& setSecond(const Second& second) {
     146    BiVariant& setSecond(const Second& s) {
    147147      destroy();
    148148      flag = false;
    149       new(reinterpret_cast<Second*>(data)) Second(second);   
     149      new(reinterpret_cast<Second*>(data)) Second(s);   
    150150      return *this;
    151151    }
    152152
    153153    /// \brief Operator form of the \c setFirst()
    154     BiVariant& operator=(const First& first) {
    155       return setFirst(first);
     154    BiVariant& operator=(const First& f) {
     155      return setFirst(f);
    156156    }
    157157
    158158    /// \brief Operator form of the \c setSecond()
    159     BiVariant& operator=(const Second& second) {
    160       return setSecond(second);
     159    BiVariant& operator=(const Second& s) {
     160      return setSecond(s);
    161161    }
    162162
Note: See TracChangeset for help on using the changeset viewer.