Estandaritzant noms segons convencions
This commit is contained in:
@@ -4,13 +4,12 @@
|
||||
#include <stdlib.h> // for free, malloc
|
||||
#include <algorithm> // for sort
|
||||
#include <iostream> // for basic_ostream, char_traits, operator<<
|
||||
#include "utils.h" // for hiScoreEntry_t
|
||||
#include "utils.h" // for HiScoreEntry
|
||||
|
||||
// Constructor
|
||||
ManageHiScoreTable::ManageHiScoreTable(std::vector<hiScoreEntry_t> *table)
|
||||
ManageHiScoreTable::ManageHiScoreTable(std::vector<HiScoreEntry> *table)
|
||||
: table(table) {}
|
||||
|
||||
|
||||
// Resetea la tabla a los valores por defecto
|
||||
void ManageHiScoreTable::clear()
|
||||
{
|
||||
@@ -31,7 +30,7 @@ void ManageHiScoreTable::clear()
|
||||
}
|
||||
|
||||
// Añade un elemento a la tabla
|
||||
void ManageHiScoreTable::add(hiScoreEntry_t entry)
|
||||
void ManageHiScoreTable::add(HiScoreEntry entry)
|
||||
{
|
||||
// Añade la entrada a la tabla
|
||||
table->push_back(entry);
|
||||
@@ -51,7 +50,7 @@ void ManageHiScoreTable::sort()
|
||||
{
|
||||
struct
|
||||
{
|
||||
bool operator()(hiScoreEntry_t a, hiScoreEntry_t b) const { return a.score > b.score; }
|
||||
bool operator()(HiScoreEntry a, HiScoreEntry b) const { return a.score > b.score; }
|
||||
} customLess;
|
||||
|
||||
std::sort(table->begin(), table->end(), customLess);
|
||||
|
||||
Reference in New Issue
Block a user