diff options
author | Johannes Schickel | 2009-11-15 02:37:37 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-11-15 02:37:37 +0000 |
commit | b2074291617725e35358d922847f890b9af55d8b (patch) | |
tree | 94f348666436d27355f2b5e52b39903cede3460e /tools | |
parent | d3fb917ee87f5bc000a7b803074e55599c8b05e9 (diff) | |
download | scummvm-rg350-b2074291617725e35358d922847f890b9af55d8b.tar.gz scummvm-rg350-b2074291617725e35358d922847f890b9af55d8b.tar.bz2 scummvm-rg350-b2074291617725e35358d922847f890b9af55d8b.zip |
Cleanup.
svn-id: r45910
Diffstat (limited to 'tools')
-rw-r--r-- | tools/create_kyradat/search.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/tools/create_kyradat/search.cpp b/tools/create_kyradat/search.cpp index a12eb231ef..509dd37f67 100644 --- a/tools/create_kyradat/search.cpp +++ b/tools/create_kyradat/search.cpp @@ -139,23 +139,19 @@ Search::Search(const char *filename) : _data(), _search() { fclose(src); _data.resize(size); - for (uint32 i = 0; i < size; ++i) - _data[i] = data[i]; + std::copy(data, data + size, _data.begin()); delete[] data; } Search::Search(const byte *data, uint32 size) : _data(), _search() { _data.resize(size); - for (uint32 i = 0; i < size; ++i) - _data[i] = data[i]; + std::copy(data, data + size, _data.begin()); } void Search::addData(SearchData data) { - for (SearchList::const_iterator i = _search.begin(); i != _search.end(); ++i) { - // Do not add any duplicates - if (*i == data) - return; - } + // Do not add any duplicates + if (std::find(_search.begin(), _search.end(), data) != _search.end()) + return; _search.push_back(data); } |