forked from jaildesigner-jailgames/jaildoctors_dilemma
Eliminado el resto de accesos a vector mediante at()
This commit is contained in:
@@ -60,7 +60,7 @@ void Stats::addDeath(std::string name)
|
||||
const int index = findByName(name, bufferList);
|
||||
if (index != -1)
|
||||
{
|
||||
bufferList.at(index).died++;
|
||||
bufferList[index].died++;
|
||||
}
|
||||
|
||||
// En caso contrario crea la entrada
|
||||
@@ -84,7 +84,7 @@ void Stats::addVisit(std::string name)
|
||||
const int index = findByName(name, bufferList);
|
||||
if (index != -1)
|
||||
{
|
||||
bufferList.at(index).visited++;
|
||||
bufferList[index].visited++;
|
||||
}
|
||||
|
||||
// En caso contrario crea la entrada
|
||||
@@ -304,8 +304,8 @@ void Stats::updateListFromBuffer()
|
||||
|
||||
if (index != -1)
|
||||
{ // Encontrado. Aumenta sus estadisticas
|
||||
list.at(index).visited += buffer.visited;
|
||||
list.at(index).died += buffer.died;
|
||||
list[index].visited += buffer.visited;
|
||||
list[index].died += buffer.died;
|
||||
}
|
||||
else
|
||||
{ // En caso contrario crea la entrada
|
||||
|
||||
Reference in New Issue
Block a user