diff options
| author | 2014-08-19 00:20:56 -0400 | |
|---|---|---|
| committer | 2014-08-19 00:32:48 -0400 | |
| commit | ab4648d3ca38c68579a72b2260dfbea81e26730f (patch) | |
| tree | acc964ea1b91fb2c13baf8244b006bb98deabc1c /src/core/hle/kernel/kernel.h | |
| parent | Merge pull request #55 from lioncash/string (diff) | |
| download | yuzu-ab4648d3ca38c68579a72b2260dfbea81e26730f.tar.gz yuzu-ab4648d3ca38c68579a72b2260dfbea81e26730f.tar.xz yuzu-ab4648d3ca38c68579a72b2260dfbea81e26730f.zip | |
Core: Use std::array for managing kernel object space
These avoid relying on memset for clearing the arrays.
Diffstat (limited to 'src/core/hle/kernel/kernel.h')
| -rw-r--r-- | src/core/hle/kernel/kernel.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h index 6a2e395ed..0e7e5ff68 100644 --- a/src/core/hle/kernel/kernel.h +++ b/src/core/hle/kernel/kernel.h | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <array> | ||
| 7 | #include <string> | 8 | #include <string> |
| 8 | #include "common/common.h" | 9 | #include "common/common.h" |
| 9 | 10 | ||
| @@ -160,9 +161,9 @@ private: | |||
| 160 | INITIAL_NEXT_ID = 0x10, | 161 | INITIAL_NEXT_ID = 0x10, |
| 161 | }; | 162 | }; |
| 162 | 163 | ||
| 163 | Object* pool[MAX_COUNT]; | 164 | std::array<Object*, MAX_COUNT> pool; |
| 164 | bool occupied[MAX_COUNT]; | 165 | std::array<bool, MAX_COUNT> occupied; |
| 165 | int next_id; | 166 | int next_id; |
| 166 | }; | 167 | }; |
| 167 | 168 | ||
| 168 | extern ObjectPool g_object_pool; | 169 | extern ObjectPool g_object_pool; |