mirror of
https://github.com/BernardoGiordano/Checkpoint
synced 2024-11-14 21:57:13 +00:00
fix compilation warnings
This commit is contained in:
parent
ff0f8cc61c
commit
b63c82d117
2 changed files with 3 additions and 3 deletions
|
@ -61,7 +61,7 @@ std::string Account::username(u128 id)
|
|||
return "";
|
||||
}
|
||||
|
||||
strncpy(username, profilebase.username, sizeof(profilebase.username));
|
||||
strncpy(username, profilebase.username, sizeof(username) - 1);
|
||||
std::string user = std::string(username);
|
||||
mUsernames.insert({id, user});
|
||||
accountProfileClose(&profile);
|
||||
|
|
|
@ -40,9 +40,9 @@ void Scrollable::updateSelection(void)
|
|||
|
||||
const size_t maxentries = maxVisibleEntries();
|
||||
const size_t maxpages = (size() % mVisibleEntries == 0) ? size() / mVisibleEntries : size() / mVisibleEntries + 1;
|
||||
const u32 hu = maxentries * mh / mVisibleEntries;
|
||||
const int hu = maxentries * mh / mVisibleEntries;
|
||||
|
||||
if (hidKeysHeld(CONTROLLER_P1_AUTO) & KEY_TOUCH && touch.py > my && touch.py < my+hu && touch.px > mx && touch.px < mx+mw)
|
||||
if (hidKeysHeld(CONTROLLER_P1_AUTO) & KEY_TOUCH && (int)touch.py > my && (int)touch.py < my+hu && (int)touch.px > mx && (int)touch.px < mx+mw)
|
||||
{
|
||||
mIndex = (size_t)((touch.py - my)*mVisibleEntries/mh);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue