Browse Source

kernel/handle-table: In-class initialize data members

Directly initializes members where applicable.
pull/15/merge
Lioncash 7 years ago
parent
commit
4f8cd74061
  1. 1
      src/core/hle/kernel/handle_table.cpp
  2. 4
      src/core/hle/kernel/handle_table.h

1
src/core/hle/kernel/handle_table.cpp

@ -23,7 +23,6 @@ constexpr u16 GetGeneration(Handle handle) {
} // Anonymous namespace } // Anonymous namespace
HandleTable::HandleTable() { HandleTable::HandleTable() {
next_generation = 1;
Clear(); Clear();
} }

4
src/core/hle/kernel/handle_table.h

@ -107,10 +107,10 @@ private:
* Global counter of the number of created handles. Stored in `generations` when a handle is * Global counter of the number of created handles. Stored in `generations` when a handle is
* created, and wraps around to 1 when it hits 0x8000. * created, and wraps around to 1 when it hits 0x8000.
*/ */
u16 next_generation;
u16 next_generation = 1;
/// Head of the free slots linked list. /// Head of the free slots linked list.
u16 next_free_slot;
u16 next_free_slot = 0;
}; };
} // namespace Kernel } // namespace Kernel
Loading…
Cancel
Save