finish refactor, add docs and CI
This commit is contained in:
@@ -28,31 +28,31 @@
|
||||
#include <map>
|
||||
#include <string.h>
|
||||
#include <string>
|
||||
#include <switch.h>
|
||||
#include <vector>
|
||||
|
||||
#include <switch.h>
|
||||
|
||||
#define USER_ICON_SIZE 64
|
||||
|
||||
namespace std {
|
||||
template <>
|
||||
struct hash<AccountUid> {
|
||||
size_t operator()(const AccountUid& a) const { return ((hash<u64>()(a.uid[0]) ^ (hash<u64>()(a.uid[1]) << 1)) >> 1); }
|
||||
};
|
||||
}
|
||||
template <> struct hash<AccountUid> {
|
||||
size_t operator()(const AccountUid& a) const {
|
||||
return ((hash<u64>()(a.uid[0]) ^ (hash<u64>()(a.uid[1]) << 1)) >> 1);
|
||||
}
|
||||
};
|
||||
} // namespace std
|
||||
|
||||
inline bool operator==(const AccountUid& x, const AccountUid& y)
|
||||
{
|
||||
inline bool operator==(const AccountUid& x, const AccountUid& y) {
|
||||
return x.uid[0] == y.uid[0] && x.uid[1] == y.uid[1];
|
||||
}
|
||||
|
||||
inline bool operator==(const AccountUid& x, u64 y)
|
||||
{
|
||||
inline bool operator==(const AccountUid& x, u64 y) {
|
||||
return x.uid[0] == y && x.uid[1] == y;
|
||||
}
|
||||
|
||||
inline bool operator<(const AccountUid& x, const AccountUid& y)
|
||||
{
|
||||
if (x.uid[0] != y.uid[0]) return x.uid[0] < y.uid[0];
|
||||
inline bool operator<(const AccountUid& x, const AccountUid& y) {
|
||||
if (x.uid[0] != y.uid[0])
|
||||
return x.uid[0] < y.uid[0];
|
||||
return x.uid[1] < y.uid[1];
|
||||
}
|
||||
|
||||
@@ -62,12 +62,11 @@ struct User {
|
||||
};
|
||||
|
||||
namespace Account {
|
||||
Result init(void);
|
||||
void exit(void);
|
||||
|
||||
std::vector<AccountUid> ids(void);
|
||||
AccountUid selectAccount(void);
|
||||
std::string username(AccountUid id);
|
||||
std::string iconPath(AccountUid id);
|
||||
}
|
||||
Result init(void);
|
||||
void exit(void);
|
||||
|
||||
std::vector<AccountUid> ids(void);
|
||||
AccountUid selectAccount(void);
|
||||
std::string username(AccountUid id);
|
||||
std::string iconPath(AccountUid id);
|
||||
} // namespace Account
|
||||
|
||||
Reference in New Issue
Block a user