Fix "comparison between signed and unsigned integer expressions"

This commit is contained in:
Koncord 2016-12-21 16:02:08 +08:00
parent af7b232789
commit 6e6237541a
6 changed files with 13 additions and 13 deletions

View file

@ -36,7 +36,7 @@ void Players::newPlayer(RakNet::RakNetGUID guid)
players[guid]->CreatureStats()->blank(); players[guid]->CreatureStats()->blank();
players[guid]->charClass.blank(); players[guid]->charClass.blank();
for (int i = 0; i < mwmp::Networking::get().maxConnections(); i++) for (unsigned int i = 0; i < mwmp::Networking::get().maxConnections(); i++)
{ {
if (slots[i] == 0) if (slots[i] == 0)
{ {
@ -63,7 +63,7 @@ TPlayers *Players::getPlayers()
Player::Player(RakNet::RakNetGUID guid) : BasePlayer(guid) Player::Player(RakNet::RakNetGUID guid) : BasePlayer(guid)
{ {
handshakeState = false; handshakeState = false;
loadState = false; loadState = NOTLOADED;
lastAttacker = 0; lastAttacker = 0;
} }

View file

@ -52,7 +52,7 @@ bool SpellFunctions::HasSpell(unsigned short pid, const char* spellId)
Player *player; Player *player;
GET_PLAYER(pid, player, false); GET_PLAYER(pid, player, false);
for (int i = 0; i < player->spellbook.count; i++) for (unsigned int i = 0; i < player->spellbook.count; i++)
if (Misc::StringUtils::ciEqual(player->spellbook.spells.at(i).id, spellId)) if (Misc::StringUtils::ciEqual(player->spellbook.spells.at(i).id, spellId))
return true; return true;
return false; return false;

View file

@ -28,7 +28,7 @@ GUIDialogList::GUIDialogList(const std::string &message, const std::vector<std::
mButton->eventMouseButtonClick += MyGUI::newDelegate(this, &GUIDialogList::mousePressed); mButton->eventMouseButtonClick += MyGUI::newDelegate(this, &GUIDialogList::mousePressed);
mMessage->setCaptionWithReplacing(message); mMessage->setCaptionWithReplacing(message);
for(int i = 0; i < list.size(); i++) for(size_t i = 0; i < list.size(); i++)
mListBox->addItem(list[i]); mListBox->addItem(list[i]);
} }

View file

@ -450,7 +450,7 @@ namespace MWWorld
{ {
PtrType mFound; PtrType mFound;
std::string mIdToFind; std::string mIdToFind;
int mRefNumIndexToFind; unsigned int mRefNumIndexToFind;
bool operator()(const PtrType& ptr) bool operator()(const PtrType& ptr)
{ {
@ -467,7 +467,7 @@ namespace MWWorld
}; };
///< Added by tes3mp and used to find an object by both its ID and its reference number ///< Added by tes3mp and used to find an object by both its ID and its reference number
Ptr CellStore::searchExact (const std::string& id, int numIndex) Ptr CellStore::searchExact (const std::string& id, unsigned int numIndex)
{ {
SearchExactVisitor<MWWorld::Ptr> searchVisitor; SearchExactVisitor<MWWorld::Ptr> searchVisitor;
searchVisitor.mIdToFind = id; searchVisitor.mIdToFind = id;
@ -477,13 +477,13 @@ namespace MWWorld
} }
// Added by tes3mp and used to get the last reference number in the cell // Added by tes3mp and used to get the last reference number in the cell
int CellStore::getLastRefNumIndex() const unsigned int CellStore::getLastRefNumIndex() const
{ {
return lastRefNumIndex; return lastRefNumIndex;
} }
// Added by tes3mp and used to record the last reference number in the cell // Added by tes3mp and used to record the last reference number in the cell
void CellStore::setLastRefNumIndex(int value) void CellStore::setLastRefNumIndex(unsigned int value)
{ {
lastRefNumIndex = value; lastRefNumIndex = value;
} }

View file

@ -76,7 +76,7 @@ namespace MWWorld
float mWaterLevel; float mWaterLevel;
// Added by tes3mp // Added by tes3mp
int lastRefNumIndex; unsigned int lastRefNumIndex;
MWWorld::TimeStamp mLastRespawn; MWWorld::TimeStamp mLastRespawn;
@ -234,13 +234,13 @@ namespace MWWorld
Ptr searchViaActorId (int id); Ptr searchViaActorId (int id);
///< Will return an empty Ptr if cell is not loaded. ///< Will return an empty Ptr if cell is not loaded.
Ptr searchExact (const std::string& id, int numIndex); Ptr searchExact (const std::string& id, unsigned int numIndex);
///< Added by tes3mp and used to find an object by both its ID and its reference number ///< Added by tes3mp and used to find an object by both its ID and its reference number
int getLastRefNumIndex() const; unsigned int getLastRefNumIndex() const;
// Added by tes3mp and used to get the last reference number in the cell // Added by tes3mp and used to get the last reference number in the cell
void setLastRefNumIndex(int value); void setLastRefNumIndex(unsigned int value);
// Added by tes3mp and used to record the last reference number in the cell // Added by tes3mp and used to record the last reference number in the cell
float getWaterLevel() const; float getWaterLevel() const;

View file

@ -22,7 +22,7 @@ void PacketSpellbook::Packet(RakNet::BitStream *bs, BasePlayer *player, bool sen
RW(player->spellbook.count, send); RW(player->spellbook.count, send);
for (int i = 0; i < player->spellbook.count; i++) for (unsigned int i = 0; i < player->spellbook.count; i++)
{ {
Spell spell; Spell spell;