diff options
author | Mark Spruiell <mes@zeroc.com> | 2002-10-24 21:30:25 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2002-10-24 21:30:25 +0000 |
commit | 19c09c807ff2fcaa0dca4b83a0b5cf084da6de3b (patch) | |
tree | 4e98398b0bd38c6faf0c44e91ff99e96efb6e9df /cpp/test/Freeze/dbmap/Client.cpp | |
parent | back out change to XERCESC_HOME (diff) | |
download | ice-19c09c807ff2fcaa0dca4b83a0b5cf084da6de3b.tar.bz2 ice-19c09c807ff2fcaa0dca4b83a0b5cf084da6de3b.tar.xz ice-19c09c807ff2fcaa0dca4b83a0b5cf084da6de3b.zip |
gcc 3.2 fixes
Diffstat (limited to 'cpp/test/Freeze/dbmap/Client.cpp')
-rw-r--r-- | cpp/test/Freeze/dbmap/Client.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/cpp/test/Freeze/dbmap/Client.cpp b/cpp/test/Freeze/dbmap/Client.cpp index 4cb2a6c93da..fd58dbbb35c 100644 --- a/cpp/test/Freeze/dbmap/Client.cpp +++ b/cpp/test/Freeze/dbmap/Client.cpp @@ -282,20 +282,20 @@ run(int argc, char* argv[], MAP& m) test(p->first == 'b'); // - // find_first_of. First construct a vector of pairs (n, o, p, - // q). The test must find one of the types (it doesn't matter + // find_first_of. First construct a map with keys n, o, p, + // q. The test must find one of the types (it doesn't matter // which since the container doesn't have to maintain sorted // order). // j = find(alphabet.begin(), alphabet.end(), 'n'); - vector< pair <Byte, Int> > pairs; - pairs.push_back(make_pair(*j, j - alphabet.begin())); + map<Byte, const Int> pairs; + pairs.insert(make_pair(*j, j - alphabet.begin())); ++j; - pairs.push_back(make_pair(*j, j - alphabet.begin())); + pairs.insert(make_pair(*j, j - alphabet.begin())); ++j; - pairs.push_back(make_pair(*j, j - alphabet.begin())); + pairs.insert(make_pair(*j, j - alphabet.begin())); ++j; - pairs.push_back(make_pair(*j, j - alphabet.begin())); + pairs.insert(make_pair(*j, j - alphabet.begin())); p = find_first_of(m.begin(), m.end(), pairs.begin(), pairs.end()); test(p != m.end()); @@ -307,10 +307,13 @@ run(int argc, char* argv[], MAP& m) test(p->first == 'n' || p->first == 'o' || p->first == 'p' || p->first == 'q'); pairs.clear(); - copy(m.begin(), m.end(), back_inserter(pairs)); + for(p = m.begin(); p != m.end(); ++p) + { + pairs.insert(make_pair(p->first, p->second)); + } test(pairs.size() == m.size()); - vector<pair<Byte, Int> >::const_iterator pit; + map<Byte, const Int>::const_iterator pit; for(pit = pairs.begin(); pit != pairs.end(); ++pit) { p = m.find(pit->first); |