ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-3.0/src/utils/TypeContainer.hpp
(Generate patch)

Comparing branches/new_design/OOPSE-3.0/src/utils/TypeContainer.hpp (file contents):
Revision 1846 by tim, Fri Dec 3 17:59:45 2004 UTC vs.
Revision 1847 by tim, Sat Dec 4 05:24:07 2004 UTC

# Line 85 | Line 85 | namespace oopse {
85                  KeyType reversedKeys = keys;
86                  std::reverse(reversedKeys.begin(), reversedKeys.end());
87  
88 <                i = data_.find(keys);
88 >                i = data_.find(reversedKeys);
89                  if (i != data_.end()) {
90                      return (i->second).second;
91                  } else {
# Line 105 | Line 105 | namespace oopse {
105                  MapTypeIterator i;
106                  std::vector<ValueType> foundTypes;
107                  
108 <                while (replaceWithWildCard(iterCont, keys, replacedKey, wildCard)) {
108 >                while (replaceWithWildCard(iterCont, keys, replacedKey, wildCard)) {                    
109                      i = data_.find(replacedKey);
110                      if (i != data_.end()) {
111                          foundTypes.push_back(i->second);
# Line 117 | Line 117 | namespace oopse {
117                  std::reverse(reversedKeys.begin(), reversedKeys.end());
118  
119                  //if the reversedKeys is the same as keys, just skip it
120 <                if (reversedKeys == keys) {
120 >                if (reversedKeys != keys) {
121  
122                      
123                      //empty the iterator container
124                      iterCont.clear();
125  
126 <                    while (replaceWithWildCard(iterCont, keys, replacedKey, wildCard)) {
126 >                    while (replaceWithWildCard(iterCont, reversedKeys, replacedKey, wildCard)) {
127                          i = data_.find(replacedKey);
128                          if (i != data_.end()) {
129                              foundTypes.push_back(i->second);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines