mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2024-11-25 09:44:02 +00:00
Thou shall not break the build (+ more warning fixes)
This commit is contained in:
parent
9bb3fe86f6
commit
0e6dccbb4e
8 changed files with 21 additions and 24 deletions
|
@ -511,9 +511,8 @@ void AnimationEditor::undo()
|
|||
std::list<SkeletalSprite>::iterator it = undoHistory.begin();
|
||||
std::advance(it, undoEntry);
|
||||
editSprite->animations = it->animations;
|
||||
if(undoEntry > 0) {
|
||||
if(undoEntry)
|
||||
undoEntry--;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ public:
|
|||
|
||||
std::list<SkeletalSprite> undoHistory;
|
||||
|
||||
int undoEntry;
|
||||
size_t undoEntry;
|
||||
|
||||
int currentKey;
|
||||
|
||||
|
|
|
@ -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,22 +311,19 @@ void AquariaComboBox::setSelectedItem(int index)
|
|||
{
|
||||
doScroll(0);
|
||||
}
|
||||
else if(index < items.size())
|
||||
else if((size_t)index < items.size())
|
||||
{
|
||||
if ((size_t) index < items.size())
|
||||
selectedItem = index;
|
||||
selectedItemLabel->setText(items[index]);
|
||||
scroll = index;
|
||||
if (scroll + numDrops > items.size())
|
||||
{
|
||||
selectedItem = index;
|
||||
selectedItemLabel->setText(items[index]);
|
||||
scroll = index;
|
||||
if (scroll + numDrops > items.size())
|
||||
{
|
||||
if (items.size() < numDrops)
|
||||
scroll = 0;
|
||||
else
|
||||
scroll = items.size() - numDrops;
|
||||
}
|
||||
if (items.size() < numDrops)
|
||||
scroll = 0;
|
||||
else
|
||||
scroll = items.size() - numDrops;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int AquariaComboBox::getSelectedItem()
|
||||
|
|
|
@ -933,7 +933,7 @@ void AquariaKeyConfig::onUpdate(float dt)
|
|||
inLoop = false;
|
||||
}
|
||||
|
||||
void AquariaKeyConfig::setActionSetIndex(int idx)
|
||||
void AquariaKeyConfig::setActionSetIndex(size_t idx)
|
||||
{
|
||||
actionSetIndex = idx;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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 << " ";
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue