Changes in lemon/concepts/maps.h [765:703ebf476a1d:1270:dceba191c00d] in lemon
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/concepts/maps.h
r765 r1270 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2013 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 50 50 /// Returns the value associated with the given key. 51 51 Value operator[](const Key &) const { 52 return * static_cast<Value *>(0);52 return *(static_cast<Value *>(0)+1); 53 53 } 54 54 … … 61 61 own_val = m[own_key]; 62 62 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); 67 67 } 68 68 const Key& key; 69 69 const typename _ReadMap::Key& own_key; 70 70 const _ReadMap& m; 71 Constraints() {} 71 72 }; 72 73 … … 100 101 m.set(own_key, own_val); 101 102 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); 106 107 } 107 108 const Key& key; … … 110 111 const typename _WriteMap::Value& own_val; 111 112 _WriteMap& m; 113 Constraints() {} 112 114 }; 113 115 }; … … 130 132 /// Returns the value associated with the given key. 131 133 Value operator[](const Key &) const { 132 return *static_cast<Value *>(0); 134 Value *r = 0; 135 return *r; 133 136 } 134 137 … … 170 173 /// Returns a reference to the value associated with the given key. 171 174 Reference operator[](const Key &) { 172 return *static_cast<Value *>(0); 175 Value *r = 0; 176 return *r; 173 177 } 174 178 175 179 /// Returns a const reference to the value associated with the given key. 176 180 ConstReference operator[](const Key &) const { 177 return *static_cast<Value *>(0); 181 Value *r = 0; 182 return *r; 178 183 } 179 184 … … 206 211 typename _ReferenceMap::ConstReference own_cref; 207 212 _ReferenceMap& m; 213 Constraints() {} 208 214 }; 209 215 };
Note: See TracChangeset
for help on using the changeset viewer.