aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/wintermute/ad/ad_scene.cpp4
-rw-r--r--engines/wintermute/base/base_surface_storage.cpp2
-rw-r--r--engines/wintermute/base/particles/part_emitter.cpp2
-rw-r--r--engines/wintermute/coll_templ.h3
4 files changed, 4 insertions, 7 deletions
diff --git a/engines/wintermute/ad/ad_scene.cpp b/engines/wintermute/ad/ad_scene.cpp
index 1e5754a778..b04f48f1fc 100644
--- a/engines/wintermute/ad/ad_scene.cpp
+++ b/engines/wintermute/ad/ad_scene.cpp
@@ -1164,7 +1164,7 @@ bool AdScene::displayRegionContent(AdRegion *region, bool display3DOnly) {
}
// sort by _posY
- qsort(objects.getData(), objects.getSize(), sizeof(AdObject *), AdScene::compareObjs);
+ Common::sort(objects.begin(), objects.end(), AdScene::compareObjs);
// display them
for (int i = 0; i < objects.getSize(); i++) {
@@ -2994,7 +2994,7 @@ bool AdScene::getRegionObjects(AdRegion *region, BaseArray<AdObject *> &objects,
}
// sort by _posY
- qsort(objects.getData(), objects.getSize(), sizeof(AdObject *), AdScene::compareObjs);
+ Common::sort(objects.begin(), objects.end(), AdScene::compareObjs);
return STATUS_OK;
}
diff --git a/engines/wintermute/base/base_surface_storage.cpp b/engines/wintermute/base/base_surface_storage.cpp
index a829732696..0e0976b838 100644
--- a/engines/wintermute/base/base_surface_storage.cpp
+++ b/engines/wintermute/base/base_surface_storage.cpp
@@ -169,7 +169,7 @@ bool BaseSurfaceStorage::persist(BasePersistenceManager *persistMgr)
//////////////////////////////////////////////////////////////////////////
bool BaseSurfaceStorage::sortSurfaces() {
- qsort(&_surfaces[0], _surfaces.size(), sizeof(BaseSurface *), surfaceSortCB);
+ Common::sort(_surfaces.begin(), _surfaces.end(), surfaceSortCB);
return STATUS_OK;
}
diff --git a/engines/wintermute/base/particles/part_emitter.cpp b/engines/wintermute/base/particles/part_emitter.cpp
index 1a6d4fe1e5..4fb0eb6637 100644
--- a/engines/wintermute/base/particles/part_emitter.cpp
+++ b/engines/wintermute/base/particles/part_emitter.cpp
@@ -367,7 +367,7 @@ bool PartEmitter::start() {
//////////////////////////////////////////////////////////////////////////
bool PartEmitter::sortParticlesByZ() {
// sort particles by _posY
- qsort(_particles.getData(), _particles.getSize(), sizeof(PartParticle *), PartEmitter::compareZ);
+ Common::sort(_particles.begin(), _particles.end(), PartEmitter::compareZ);
return STATUS_OK;
}
diff --git a/engines/wintermute/coll_templ.h b/engines/wintermute/coll_templ.h
index 96daaf62ee..fea203d100 100644
--- a/engines/wintermute/coll_templ.h
+++ b/engines/wintermute/coll_templ.h
@@ -83,9 +83,6 @@ public:
void copy(const BaseArray<T2> &src) {
Common::Array<TYPE>::insert_at(0, src);
}
- void *getData() { // Ugly, should perhaps add a sort-function instead.
- return Common::Array<TYPE>::_storage;
- }
};
} // end of namespace Wintermute