diff options
author | Bernard Normier <bernard@zeroc.com> | 2003-04-29 19:51:33 +0000 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2003-04-29 19:51:33 +0000 |
commit | d6b805efcf63a16a759f0a104db74c5e9c009f7d (patch) | |
tree | 2a73b6a3e15c2cf711a0c4f1ab12dd52687e003e /cpp/src/IceStorm/WeightedGraph.cpp | |
parent | file UserExceptionFactory.h was initially added on branch slicing. (diff) | |
download | ice-d6b805efcf63a16a759f0a104db74c5e9c009f7d.tar.bz2 ice-d6b805efcf63a16a759f0a104db74c5e9c009f7d.tar.xz ice-d6b805efcf63a16a759f0a104db74c5e9c009f7d.zip |
Sun: 64 bit + CC 5.3 support
Diffstat (limited to 'cpp/src/IceStorm/WeightedGraph.cpp')
-rw-r--r-- | cpp/src/IceStorm/WeightedGraph.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cpp/src/IceStorm/WeightedGraph.cpp b/cpp/src/IceStorm/WeightedGraph.cpp index 6f006893dce..25c11877998 100644 --- a/cpp/src/IceStorm/WeightedGraph.cpp +++ b/cpp/src/IceStorm/WeightedGraph.cpp @@ -262,12 +262,12 @@ WeightedGraph::getEdgesFor(const std::string& vertex) const map<std::string, int>::const_iterator p = _vlookup.find(vertex); if(p != _vlookup.end()) { - int row = p->second * _vertices.size(); - for(unsigned int i = row; i < row + _vertices.size(); ++i) + size_t row = p->second * _vertices.size(); + for(size_t i = row; i < row + _vertices.size(); ++i) { if(_edges[i] != -1) { - edges.push_back(make_pair(_vertices[i-row], _edges[i])); + edges.push_back(make_pair(_vertices[i - row], _edges[i])); } } } @@ -346,14 +346,14 @@ WeightedGraph::visit(unsigned int vertex, int cost, list<pair<unsigned int, int> // Run through each edges for this vertex (that's a row in the // adjacency matrix). // - int row = vertex * _vertices.size(); - for(unsigned int i = row ; i < row + _vertices.size() ; ++i) + size_t row = vertex * _vertices.size(); + for(size_t i = row ; i < row + _vertices.size() ; ++i) { if(_edges[i] != -1) { if(cost + _edges[i] <= max) { - visit(i - row, cost + _edges[i], visited, max); + visit(static_cast<unsigned int>(i - row), cost + _edges[i], visited, max); } } } |