(svn r11600) -Cleanup: remove extra out-of-memory checks, since it's now done in *allocT functions.

This commit is contained in:
glx
2007-12-08 15:47:23 +00:00
parent 2256d9d378
commit b47bce651e
10 changed files with 4 additions and 26 deletions

View File

@@ -43,9 +43,6 @@ static void BuildGroupList(grouplist_d* gl, PlayerID owner, VehicleType vehicle_
if (!(gl->l.flags & VL_REBUILD)) return;
list = MallocT<const Group*>(GetGroupArraySize());
if (GetGroupArraySize() != 0 && list == NULL) {
error("Could not allocate memory for the group-sorting-list");
}
FOR_ALL_GROUPS(g) {
if (g->owner == owner && g->vehicle_type == vehicle_type) list[n++] = g;
@@ -53,9 +50,6 @@ static void BuildGroupList(grouplist_d* gl, PlayerID owner, VehicleType vehicle_
free((void*)gl->sort_list);
gl->sort_list = MallocT<const Group *>(n);
if (n != 0 && gl->sort_list == NULL) {
error("Could not allocate memory for the group-sorting-list");
}
gl->l.list_length = n;
for (uint i = 0; i < n; ++i) gl->sort_list[i] = list[i];