+
+void Inventory::Sort() {
+ std::sort(entries, entries + 96, Entry::Less);
+}
+
+bool Inventory::Entry::Less(const Entry &lhs, const Entry &rhs) {
+ if (lhs.item) {
+ if (rhs.item) {
+ return Item::Less(*lhs.item, *rhs.item);
+ } else {
+ return true;
+ }
+ } else {
+ return false;
+ }
+}
+