Some inline + remove useless const&.

This commit is contained in:
StackZ
2020-11-06 02:10:58 +01:00
parent 689192e902
commit ddbea3ab36
35 changed files with 186 additions and 228 deletions
+6 -9
View File
@@ -49,9 +49,9 @@ static void DrawCheck(int pos, bool v) {
/*
Return SortType as an uint8_t.
const SortType &st: Const Reference to the SortType variable.
SortType st: The SortType variable.
*/
static const uint8_t GetType(const SortType &st) {
static const uint8_t GetType(SortType st) {
switch(st) {
case SortType::TITLE:
return 0;
@@ -69,10 +69,10 @@ static const uint8_t GetType(const SortType &st) {
/*
Draw the Sort Menu.
const bool &asc: Const Reference to the Ascending variable.
const SortType &st: Const Reference to the SortType variable.
bool asc: The Ascending variable.
SortType st: The SortType variable.
*/
void StoreUtils::DrawSorting(const bool &asc, const SortType &st) {
void StoreUtils::DrawSorting(bool asc, SortType st) {
Gui::Draw_Rect(48, 0, 272, 25, ENTRY_BAR_COLOR);
Gui::Draw_Rect(48, 25, 272, 1, ENTRY_BAR_OUTL_COLOR);
Gui::DrawStringCentered(25, 2, 0.6, TEXT_COLOR, Lang::get("SORTING"), 265);
@@ -113,15 +113,12 @@ void StoreUtils::DrawSorting(const bool &asc, const SortType &st) {
- Change the Top Style.
u32 hDown: The hidKeysDown() variable.
u32 hHeld: The hidKeysHeld() variable.
touchPosition touch: The TouchPosition variable.
std::unique_ptr<Store> &store: Reference to the Store class.
std::vector<std::unique_ptr<StoreEntry>> &entries: Reference to the StoreEntries.
bool &asc: Reference to the Ascending variable.
SortType &st: Reference to the SortType.
*/
void StoreUtils::SortHandle(u32 hDown, u32 hHeld, touchPosition touch, std::unique_ptr<Store> &store, std::vector<std::unique_ptr<StoreEntry>> &entries, bool &asc, SortType &st) {
void StoreUtils::SortHandle(std::unique_ptr<Store> &store, std::vector<std::unique_ptr<StoreEntry>> &entries, bool &asc, SortType &st) {
if (store && store->GetValid() && entries.size() > 0) { // Ensure, this is valid and more than 0 entries exist.
if (hDown & KEY_TOUCH) {
/* SortType Part. */