diff options
| author | Lioncash <mathew1800@gmail.com> | 2018-09-09 19:09:37 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2018-09-09 19:45:25 -0400 |
| commit | 9516eccd69fb542a687ea3722f10c1fcfc8bcb4e (patch) | |
| tree | f186a863ebd59be02e99902b9b8a9d3c086a0043 /src/yuzu/compatibility_list.cpp | |
| parent | 981185d295aad0ad8307729f260ce521e3f95a24 (diff) | |
yuzu: Move compatibility list specifics to their own source files
Lets us keep the generic portions of the compatibility list code
together, and allows us to introduce a type alias that makes it so we
don't need to type out a very long type declaration anymore, making the
immediate readability of some code better.
Diffstat (limited to 'src/yuzu/compatibility_list.cpp')
| -rw-r--r-- | src/yuzu/compatibility_list.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/yuzu/compatibility_list.cpp b/src/yuzu/compatibility_list.cpp new file mode 100644 index 0000000000..2d2cfd03cd --- /dev/null +++ b/src/yuzu/compatibility_list.cpp @@ -0,0 +1,18 @@ +// Copyright 2018 yuzu Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include <algorithm> + +#include <fmt/format.h> + +#include "yuzu/compatibility_list.h" + +CompatibilityList::const_iterator FindMatchingCompatibilityEntry( + const CompatibilityList& compatibility_list, u64 program_id) { + return std::find_if(compatibility_list.begin(), compatibility_list.end(), + [program_id](const auto& element) { + std::string pid = fmt::format("{:016X}", program_id); + return element.first == pid; + }); +} |
