1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2024-11-29 03:33:48 +00:00

Thou shall not break the build (+ more warning fixes)

This commit is contained in:
fgenesis 2017-01-19 21:48:47 +01:00
parent 9bb3fe86f6
commit 0e6dccbb4e
8 changed files with 21 additions and 24 deletions

View file

@ -511,12 +511,11 @@ void AnimationEditor::undo()
std::list<SkeletalSprite>::iterator it = undoHistory.begin();
std::advance(it, undoEntry);
editSprite->animations = it->animations;
if(undoEntry > 0) {
if(undoEntry)
undoEntry--;
}
}
}
}
void AnimationEditor::redo()
{

View file

@ -94,7 +94,7 @@ public:
std::list<SkeletalSprite> undoHistory;
int undoEntry;
size_t undoEntry;
int currentKey;

View file

@ -300,7 +300,8 @@ bool AquariaComboBox::setSelectedItem(const std::string &item)
void AquariaComboBox::setSelectedItem(int index)
{
if (isopen) close();
if (isopen)
close();
if (index == AQUARIACOMBOBOXITEM_UP)
{
@ -310,9 +311,7 @@ void AquariaComboBox::setSelectedItem(int index)
{
doScroll(0);
}
else if(index < items.size())
{
if ((size_t) index < items.size())
else if((size_t)index < items.size())
{
selectedItem = index;
selectedItemLabel->setText(items[index]);
@ -326,7 +325,6 @@ void AquariaComboBox::setSelectedItem(int index)
}
}
}
}
int AquariaComboBox::getSelectedItem()
{

View file

@ -933,7 +933,7 @@ void AquariaKeyConfig::onUpdate(float dt)
inLoop = false;
}
void AquariaKeyConfig::setActionSetIndex(int idx)
void AquariaKeyConfig::setActionSetIndex(size_t idx)
{
actionSetIndex = idx;
}

View file

@ -175,7 +175,7 @@ public:
static AquariaKeyConfig *waitingForInput;
void setAcceptEsc(bool a);
void setActionSetIndex(int idx);
void setActionSetIndex(size_t idx);
void setRejectJoyAxis(bool b);
protected:
@ -191,7 +191,7 @@ protected:
int inputIdx;
TTFText *keyConfigFont;
Quad *bg;
int actionSetIndex;
size_t actionSetIndex;
bool acceptEsc;
bool rejectJoyAxis;
};

View file

@ -2378,7 +2378,7 @@ void Continuity::saveFile(int slot, Vector position, unsigned char *scrShotData,
XMLElement *worldMap = doc.NewElement("WorldMap");
{
std::ostringstream os;
for (int i = 0; i < dsq->continuity.worldMap.getNumWorldMapTiles(); i++)
for (size_t i = 0; i < dsq->continuity.worldMap.getNumWorldMapTiles(); i++)
{
WorldMapTile *tile = dsq->continuity.worldMap.getWorldMapTile(i);
if (tile->revealed)
@ -2391,7 +2391,7 @@ void Continuity::saveFile(int slot, Vector position, unsigned char *scrShotData,
if (dsq->game->worldMapRender)
{
std::ostringstream os;
for (int i = 0; i < dsq->continuity.worldMap.getNumWorldMapTiles(); i++)
for (size_t i = 0; i < dsq->continuity.worldMap.getNumWorldMapTiles(); i++)
{
WorldMapTile *tile = dsq->continuity.worldMap.getWorldMapTile(i);
os << tile->index << " ";

View file

@ -4502,7 +4502,7 @@ void DSQ::onJoystickRemoved(int instanceID)
void DSQ::fixupJoysticks()
{
for(int i = 0; i < getNumJoysticks(); ++i)
for(size_t i = 0; i < getNumJoysticks(); ++i)
if(Joystick *j = getJoystick(i))
j->setEnabled(false);

View file

@ -2216,7 +2216,7 @@ bool Game::saveScene(std::string scene)
saveFile.InsertEndChild(entitiesNode);
}
for (i = 0; i < LR_MAX; i++)
for (int i = 0; i < LR_MAX; i++)
{
std::string s = simpleElements[i].str();
if (!s.empty())