'sortloot' revamp
Change the sortloot option to use qsort() instead of naive insertion sort. After sorting, it reorders the linked list into the sorted order, so might have some subtle change(s) in behavior since that wasn't done before. pickup.c includes some formatting cleanup. modified: include/extern.h, hack.h, obj.h src/do.c, do_wear.c, end.c, invent.c, pickup.c
This commit is contained in:
4
src/do.c
4
src/do.c
@@ -813,8 +813,8 @@ int retry;
|
||||
bypass_objlist(invent, FALSE);
|
||||
} else {
|
||||
/* should coordinate with perm invent, maybe not show worn items */
|
||||
n = query_objlist("What would you like to drop?", invent,
|
||||
USE_INVLET | INVORDER_SORT, &pick_list, PICK_ANY,
|
||||
n = query_objlist("What would you like to drop?", &invent,
|
||||
(USE_INVLET | INVORDER_SORT), &pick_list, PICK_ANY,
|
||||
all_categories ? allow_all : allow_category);
|
||||
if (n > 0) {
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user