diff options
| author | 2023-10-17 22:44:21 -0400 | |
|---|---|---|
| committer | 2023-10-17 22:44:21 -0400 | |
| commit | c5bdc0054cf60d5924046306d8a01991b70035a5 (patch) | |
| tree | 098b2266681e6279cc8eb95d6f7029feba8e7037 /src/tests/common/unique_function.cpp | |
| parent | Merge pull request #11774 from liamwhite/refcount-issue (diff) | |
| download | yuzu-c5bdc0054cf60d5924046306d8a01991b70035a5.tar.gz yuzu-c5bdc0054cf60d5924046306d8a01991b70035a5.tar.xz yuzu-c5bdc0054cf60d5924046306d8a01991b70035a5.zip | |
general: fix build failure on clang 17
Diffstat (limited to 'src/tests/common/unique_function.cpp')
| -rw-r--r-- | src/tests/common/unique_function.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tests/common/unique_function.cpp b/src/tests/common/unique_function.cpp index f7a23e876..42e6ade09 100644 --- a/src/tests/common/unique_function.cpp +++ b/src/tests/common/unique_function.cpp | |||
| @@ -46,8 +46,8 @@ TEST_CASE("UniqueFunction", "[common]") { | |||
| 46 | Noisy noisy; | 46 | Noisy noisy; |
| 47 | REQUIRE(noisy.state == "Default constructed"); | 47 | REQUIRE(noisy.state == "Default constructed"); |
| 48 | 48 | ||
| 49 | Common::UniqueFunction<void> func = [noisy = std::move(noisy)] { | 49 | Common::UniqueFunction<void> func = [noisy_inner = std::move(noisy)] { |
| 50 | REQUIRE(noisy.state == "Move constructed"); | 50 | REQUIRE(noisy_inner.state == "Move constructed"); |
| 51 | }; | 51 | }; |
| 52 | REQUIRE(noisy.state == "Moved away"); | 52 | REQUIRE(noisy.state == "Moved away"); |
| 53 | func(); | 53 | func(); |
| @@ -101,7 +101,7 @@ TEST_CASE("UniqueFunction", "[common]") { | |||
| 101 | }; | 101 | }; |
| 102 | Foo object{&num_destroyed}; | 102 | Foo object{&num_destroyed}; |
| 103 | { | 103 | { |
| 104 | Common::UniqueFunction<void> func = [object = std::move(object)] {}; | 104 | Common::UniqueFunction<void> func = [object_inner = std::move(object)] {}; |
| 105 | REQUIRE(num_destroyed == 0); | 105 | REQUIRE(num_destroyed == 0); |
| 106 | } | 106 | } |
| 107 | REQUIRE(num_destroyed == 1); | 107 | REQUIRE(num_destroyed == 1); |