COIN-OR::LEMON - Graph Library

Changeset 2386:81b47fc5c444 in lemon-0.x for lemon/bits/array_map.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/array_map.h

    r2384 r2386  
    8282      Parent::attach(graph.notifier(Item()));
    8383      allocate_memory();
    84       Notifier* notifier = Parent::notifier();
    85       Item it;
    86       for (notifier->first(it); it != INVALID; notifier->next(it)) {
    87         int id = notifier->id(it);;
     84      Notifier* nf = Parent::notifier();
     85      Item it;
     86      for (nf->first(it); it != INVALID; nf->next(it)) {
     87        int id = nf->id(it);;
    8888        allocator.construct(&(values[id]), Value());
    8989      }                                                         
     
    9696      Parent::attach(graph.notifier(Item()));
    9797      allocate_memory();
    98       Notifier* notifier = Parent::notifier();
    99       Item it;
    100       for (notifier->first(it); it != INVALID; notifier->next(it)) {
    101         int id = notifier->id(it);;
     98      Notifier* nf = Parent::notifier();
     99      Item it;
     100      for (nf->first(it); it != INVALID; nf->next(it)) {
     101        int id = nf->id(it);;
    102102        allocator.construct(&(values[id]), value);
    103103      }                                                         
     
    114114      if (capacity == 0) return;
    115115      values = allocator.allocate(capacity);
    116       Notifier* notifier = Parent::notifier();
    117       Item it;
    118       for (notifier->first(it); it != INVALID; notifier->next(it)) {
    119         int id = notifier->id(it);;
     116      Notifier* nf = Parent::notifier();
     117      Item it;
     118      for (nf->first(it); it != INVALID; nf->next(it)) {
     119        int id = nf->id(it);;
    120120        allocator.construct(&(values[id]), copy.values[id]);
    121121      }
     
    143143    ArrayMap& operator=(const CMap& cmap) {
    144144      checkConcept<concepts::ReadMap<Key, _Value>, CMap>();
    145       const typename Parent::Notifier* notifier = Parent::notifier();
    146       Item it;
    147       for (notifier->first(it); it != INVALID; notifier->next(it)) {
     145      const typename Parent::Notifier* nf = Parent::notifier();
     146      Item it;
     147      for (nf->first(it); it != INVALID; nf->next(it)) {
    148148        set(it, cmap[it]);
    149149      }
     
    202202    /// and it overrides the add() member function of the observer base.     
    203203    virtual void add(const Key& key) {
    204       Notifier* notifier = Parent::notifier();
    205       int id = notifier->id(key);
     204      Notifier* nf = Parent::notifier();
     205      int id = nf->id(key);
    206206      if (id >= capacity) {
    207207        int new_capacity = (capacity == 0 ? 1 : capacity);
     
    211211        Value* new_values = allocator.allocate(new_capacity);
    212212        Item it;
    213         for (notifier->first(it); it != INVALID; notifier->next(it)) {
    214           int jd = notifier->id(it);;
     213        for (nf->first(it); it != INVALID; nf->next(it)) {
     214          int jd = nf->id(it);;
    215215          if (id != jd) {
    216216            allocator.construct(&(new_values[jd]), values[jd]);
     
    230230    /// and it overrides the add() member function of the observer base.     
    231231    virtual void add(const std::vector<Key>& keys) {
    232       Notifier* notifier = Parent::notifier();
     232      Notifier* nf = Parent::notifier();
    233233      int max_id = -1;
    234       for (int i = 0; i < (int)keys.size(); ++i) {
    235         int id = notifier->id(keys[i]);
     234      for (int i = 0; i < int(keys.size()); ++i) {
     235        int id = nf->id(keys[i]);
    236236        if (id > max_id) {
    237237          max_id = id;
     
    245245        Value* new_values = allocator.allocate(new_capacity);
    246246        Item it;
    247         for (notifier->first(it); it != INVALID; notifier->next(it)) {
    248           int id = notifier->id(it);
     247        for (nf->first(it); it != INVALID; nf->next(it)) {
     248          int id = nf->id(it);
    249249          bool found = false;
    250           for (int i = 0; i < (int)keys.size(); ++i) {
    251             int jd = notifier->id(keys[i]);
     250          for (int i = 0; i < int(keys.size()); ++i) {
     251            int jd = nf->id(keys[i]);
    252252            if (id == jd) {
    253253              found = true;
     
    263263        capacity = new_capacity;
    264264      }
    265       for (int i = 0; i < (int)keys.size(); ++i) {
    266         int id = notifier->id(keys[i]);
     265      for (int i = 0; i < int(keys.size()); ++i) {
     266        int id = nf->id(keys[i]);
    267267        allocator.construct(&(values[id]), Value());
    268268      }
     
    283283    /// and it overrides the erase() member function of the observer base.     
    284284    virtual void erase(const std::vector<Key>& keys) {
    285       for (int i = 0; i < (int)keys.size(); ++i) {
     285      for (int i = 0; i < int(keys.size()); ++i) {
    286286        int id = Parent::notifier()->id(keys[i]);
    287287        allocator.destroy(&(values[id]));
     
    294294    /// and it overrides the build() member function of the observer base.
    295295    virtual void build() {
    296       Notifier* notifier = Parent::notifier();
     296      Notifier* nf = Parent::notifier();
    297297      allocate_memory();
    298298      Item it;
    299       for (notifier->first(it); it != INVALID; notifier->next(it)) {
    300         int id = notifier->id(it);;
     299      for (nf->first(it); it != INVALID; nf->next(it)) {
     300        int id = nf->id(it);;
    301301        allocator.construct(&(values[id]), Value());
    302302      }                                                         
     
    308308    /// and it overrides the clear() member function of the observer base.     
    309309    virtual void clear() {     
    310       Notifier* notifier = Parent::notifier();
     310      Notifier* nf = Parent::notifier();
    311311      if (capacity != 0) {
    312312        Item it;
    313         for (notifier->first(it); it != INVALID; notifier->next(it)) {
    314           int id = notifier->id(it);
     313        for (nf->first(it); it != INVALID; nf->next(it)) {
     314          int id = nf->id(it);
    315315          allocator.destroy(&(values[id]));
    316316        }                                                               
Note: See TracChangeset for help on using the changeset viewer.