COIN-OR::LEMON - Graph Library

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/concepts/maps.h

    r765 r1270  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2009
     5 * Copyright (C) 2003-2013
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    5050      /// Returns the value associated with the given key.
    5151      Value operator[](const Key &) const {
    52         return *static_cast<Value *>(0);
     52        return *(static_cast<Value *>(0)+1);
    5353      }
    5454
     
    6161          own_val = m[own_key];
    6262
    63           ignore_unused_variable_warning(key);
    64           ignore_unused_variable_warning(val);
    65           ignore_unused_variable_warning(own_key);
    66           ignore_unused_variable_warning(own_val);
     63          ::lemon::ignore_unused_variable_warning(key);
     64          ::lemon::ignore_unused_variable_warning(val);
     65          ::lemon::ignore_unused_variable_warning(own_key);
     66          ::lemon::ignore_unused_variable_warning(own_val);
    6767        }
    6868        const Key& key;
    6969        const typename _ReadMap::Key& own_key;
    7070        const _ReadMap& m;
     71        Constraints() {}
    7172      };
    7273
     
    100101          m.set(own_key, own_val);
    101102
    102           ignore_unused_variable_warning(key);
    103           ignore_unused_variable_warning(val);
    104           ignore_unused_variable_warning(own_key);
    105           ignore_unused_variable_warning(own_val);
     103          ::lemon::ignore_unused_variable_warning(key);
     104          ::lemon::ignore_unused_variable_warning(val);
     105          ::lemon::ignore_unused_variable_warning(own_key);
     106          ::lemon::ignore_unused_variable_warning(own_val);
    106107        }
    107108        const Key& key;
     
    110111        const typename _WriteMap::Value& own_val;
    111112        _WriteMap& m;
     113        Constraints() {}
    112114      };
    113115    };
     
    130132      /// Returns the value associated with the given key.
    131133      Value operator[](const Key &) const {
    132         return *static_cast<Value *>(0);
     134        Value *r = 0;
     135        return *r;
    133136      }
    134137
     
    170173      /// Returns a reference to the value associated with the given key.
    171174      Reference operator[](const Key &) {
    172         return *static_cast<Value *>(0);
     175        Value *r = 0;
     176        return *r;
    173177      }
    174178
    175179      /// Returns a const reference to the value associated with the given key.
    176180      ConstReference operator[](const Key &) const {
    177         return *static_cast<Value *>(0);
     181        Value *r = 0;
     182        return *r;
    178183      }
    179184
     
    206211        typename _ReferenceMap::ConstReference own_cref;
    207212        _ReferenceMap& m;
     213        Constraints() {}
    208214      };
    209215    };
Note: See TracChangeset for help on using the changeset viewer.