summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2018-10-24 00:10:39 -0400
committerGravatar Lioncash2018-10-24 00:13:08 -0400
commita3d1ede25ff3dfc6b9a8ad765436dd6290f9dc4e (patch)
treecef388cffa8fea2e0ebebb53f7133006fb9ddce5 /src
parentMerge pull request #1551 from ogniK5377/improved-svcbreak (diff)
downloadyuzu-a3d1ede25ff3dfc6b9a8ad765436dd6290f9dc4e.tar.gz
yuzu-a3d1ede25ff3dfc6b9a8ad765436dd6290f9dc4e.tar.xz
yuzu-a3d1ede25ff3dfc6b9a8ad765436dd6290f9dc4e.zip
aoc_u: Make use of previously-unused CheckAOCTitleIDMatchesBase() function
We can just call the function instead of duplicating the code here. This also prevents an unused function warning. We also don't need to take the lambda capture by reference. It's just a u64 value, so by value is fine here.
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/aoc/aoc_u.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp
index 428069df2..54305cf05 100644
--- a/src/core/hle/service/aoc/aoc_u.cpp
+++ b/src/core/hle/service/aoc/aoc_u.cpp
@@ -24,8 +24,8 @@ namespace Service::AOC {
24constexpr u64 DLC_BASE_TITLE_ID_MASK = 0xFFFFFFFFFFFFE000; 24constexpr u64 DLC_BASE_TITLE_ID_MASK = 0xFFFFFFFFFFFFE000;
25constexpr u64 DLC_BASE_TO_AOC_ID = 0x1000; 25constexpr u64 DLC_BASE_TO_AOC_ID = 0x1000;
26 26
27static bool CheckAOCTitleIDMatchesBase(u64 base, u64 aoc) { 27static bool CheckAOCTitleIDMatchesBase(u64 title_id, u64 base) {
28 return (aoc & DLC_BASE_TITLE_ID_MASK) == base; 28 return (title_id & DLC_BASE_TITLE_ID_MASK) == base;
29} 29}
30 30
31static std::vector<u64> AccumulateAOCTitleIDs() { 31static std::vector<u64> AccumulateAOCTitleIDs() {
@@ -74,7 +74,7 @@ void AOC_U::CountAddOnContent(Kernel::HLERequestContext& ctx) {
74 const auto current = Core::System::GetInstance().CurrentProcess()->GetTitleID(); 74 const auto current = Core::System::GetInstance().CurrentProcess()->GetTitleID();
75 rb.Push<u32>(static_cast<u32>( 75 rb.Push<u32>(static_cast<u32>(
76 std::count_if(add_on_content.begin(), add_on_content.end(), 76 std::count_if(add_on_content.begin(), add_on_content.end(),
77 [&current](u64 tid) { return (tid & DLC_BASE_TITLE_ID_MASK) == current; }))); 77 [current](u64 tid) { return CheckAOCTitleIDMatchesBase(tid, current); })));
78} 78}
79 79
80void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) { 80void AOC_U::ListAddOnContent(Kernel::HLERequestContext& ctx) {