mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-09 19:32:11 +00:00
HPL1: replace std::sort usage
This commit is contained in:
parent
b63ed0b537
commit
f30a1e139c
@ -36,7 +36,7 @@
|
||||
|
||||
#include "hpl1/engine/impl/tinyXML/tinyxml.h"
|
||||
|
||||
//#include <algorithm>
|
||||
#include "common/algorithm.h"
|
||||
|
||||
namespace hpl {
|
||||
|
||||
@ -359,9 +359,9 @@ void cAINodeContainer::Compile() {
|
||||
|
||||
///////////////////////////////////////
|
||||
// Sort nodes and remove unwanted ones.
|
||||
#if 0
|
||||
std::sort(pNode->mvEdges.begin(), pNode->mvEdges.end(), cSortEndNodes());
|
||||
#endif
|
||||
|
||||
Common::sort(pNode->mvEdges.data(), pNode->mvEdges.data() + pNode->mvEdges.size(), cSortEndNodes());
|
||||
|
||||
// Resize if to too large
|
||||
if (mlMaxNodeEnds > 0 && (int)pNode->mvEdges.size() > mlMaxNodeEnds) {
|
||||
pNode->mvEdges.resize(mlMaxNodeEnds);
|
||||
|
@ -34,7 +34,7 @@
|
||||
|
||||
#include "hpl1/engine/system/low_level_system.h"
|
||||
|
||||
//#include <algorithm>
|
||||
#include "common/algorithm.h"
|
||||
|
||||
namespace hpl {
|
||||
|
||||
@ -133,9 +133,7 @@ void iResourceManager::DestroyUnused(int alMaxToKeep) {
|
||||
}
|
||||
|
||||
// Sort the sounds according to num of users and then time.
|
||||
#if 0
|
||||
std::sort(vResources.begin(), vResources.end(), cSortResources());
|
||||
#endif
|
||||
Common::sort(vResources.data(), vResources.data() + vResources.size(), cSortResources());
|
||||
// Log("-------------Num: %d-----------------\n",vResources.size());
|
||||
for (size_t i = alMaxToKeep; i < vResources.size(); ++i) {
|
||||
iResourceBase *pRes = vResources[i];
|
||||
|
Loading…
Reference in New Issue
Block a user