diff options
| author | 2020-07-27 19:00:41 -0400 | |
|---|---|---|
| committer | 2020-07-27 21:21:01 -0400 | |
| commit | a7af349daee85237384dba07533c9a407cf15592 (patch) | |
| tree | e337a6e823960cc6b2a7d05c7e33e80cc51a4581 /src/tests/core | |
| parent | Merge pull request #4419 from lioncash/initializer (diff) | |
| download | yuzu-a7af349daee85237384dba07533c9a407cf15592.tar.gz yuzu-a7af349daee85237384dba07533c9a407cf15592.tar.xz yuzu-a7af349daee85237384dba07533c9a407cf15592.zip | |
core_timing: Make use of uintptr_t to represent user_data
Makes the interface future-proofed for supporting other platforms in the event we ever support platforms with differing pointer sizes. This way, we have a type in place that is always guaranteed to be able to represent a pointer exactly.
Diffstat (limited to 'src/tests/core')
| -rw-r--r-- | src/tests/core/core_timing.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tests/core/core_timing.cpp b/src/tests/core/core_timing.cpp index 244463a47..022b26e6d 100644 --- a/src/tests/core/core_timing.cpp +++ b/src/tests/core/core_timing.cpp | |||
| @@ -25,10 +25,10 @@ std::bitset<CB_IDS.size()> callbacks_ran_flags; | |||
| 25 | u64 expected_callback = 0; | 25 | u64 expected_callback = 0; |
| 26 | 26 | ||
| 27 | template <unsigned int IDX> | 27 | template <unsigned int IDX> |
| 28 | void HostCallbackTemplate(u64 userdata, std::chrono::nanoseconds ns_late) { | 28 | void HostCallbackTemplate(std::uintptr_t user_data, std::chrono::nanoseconds ns_late) { |
| 29 | static_assert(IDX < CB_IDS.size(), "IDX out of range"); | 29 | static_assert(IDX < CB_IDS.size(), "IDX out of range"); |
| 30 | callbacks_ran_flags.set(IDX); | 30 | callbacks_ran_flags.set(IDX); |
| 31 | REQUIRE(CB_IDS[IDX] == userdata); | 31 | REQUIRE(CB_IDS[IDX] == user_data); |
| 32 | REQUIRE(CB_IDS[IDX] == CB_IDS[calls_order[expected_callback]]); | 32 | REQUIRE(CB_IDS[IDX] == CB_IDS[calls_order[expected_callback]]); |
| 33 | delays[IDX] = ns_late.count(); | 33 | delays[IDX] = ns_late.count(); |
| 34 | ++expected_callback; | 34 | ++expected_callback; |