Fix spacing irregularities

coverity_scan^2
David Cernat 8 years ago
parent d4b5c826f8
commit 9e290ad799

@ -414,7 +414,7 @@ void Networking::processWorldPacket(RakNet::Packet *packet)
{ {
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_OBJECT_DELETE from %s", LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "Received ID_OBJECT_DELETE from %s",
player->Npc()->mName.c_str()); player->Npc()->mName.c_str());
myPacket->Read(event); myPacket->Read(event);
LOG_APPEND(Log::LOG_WARN, "- cellRef: %s, %i\n- cell: %s", LOG_APPEND(Log::LOG_WARN, "- cellRef: %s, %i\n- cell: %s",

@ -12,7 +12,7 @@ void Players::deletePlayer(RakNet::RakNetGUID guid)
{ {
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Deleting player with guid %lu", LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "Deleting player with guid %lu",
guid.g); guid.g);
if (players[guid] != 0) if (players[guid] != 0)
{ {
LOG_APPEND(Log::LOG_INFO, "- Emptying slot %i", LOG_APPEND(Log::LOG_INFO, "- Emptying slot %i",

@ -19,7 +19,7 @@ class GUIFunctions
public: public:
/* Do not rename into MessageBox to not conflict with WINAPI's MessageBox */ /* Do not rename into MessageBox to not conflict with WINAPI's MessageBox */
static void _MessageBox(unsigned short pid, int id, const char *label) noexcept; static void _MessageBox(unsigned short pid, int id, const char *label) noexcept;
static void CustomMessageBox(unsigned short pid, int id, const char *label, const char *buttons) noexcept; static void CustomMessageBox(unsigned short pid, int id, const char *label, const char *buttons) noexcept;
static void InputDialog(unsigned short pid, int id, const char *label) noexcept; static void InputDialog(unsigned short pid, int id, const char *label) noexcept;

@ -236,7 +236,6 @@ int main(int argc, char *argv[])
mclient->SetMOTD(motd); mclient->SetMOTD(motd);
thrQuery = thread(queryThread, mclient); thrQuery = thread(queryThread, mclient);
} }
int code = networking.mainLoop(); int code = networking.mainLoop();

@ -77,7 +77,7 @@ void LocalPlayer::charGen(int stageFirst, int stageEnd)
bool LocalPlayer::charGenThread() bool LocalPlayer::charGenThread()
{ {
MWBase::WindowManager *windowManager = MWBase::Environment::get().getWindowManager(); MWBase::WindowManager *windowManager = MWBase::Environment::get().getWindowManager();
// If we haven't finished CharGen and we're in a menu, it must be // If we haven't finished CharGen and we're in a menu, it must be
// one of the CharGen menus, so go no further until it's closed // one of the CharGen menus, so go no further until it's closed
if (windowManager->isGuiMode() && CharGenStage()->end != 0) if (windowManager->isGuiMode() && CharGenStage()->end != 0)
@ -110,7 +110,7 @@ bool LocalPlayer::charGenThread()
return false; return false;
} }
// If we've reached the last stage of CharGen, send the // If we've reached the last stage of CharGen, send the
// corresponding packets and mark CharGen as finished // corresponding packets and mark CharGen as finished
else if (CharGenStage()->end != 0) else if (CharGenStage()->end != 0)
@ -219,7 +219,7 @@ void LocalPlayer::updateSkills(bool forceUpdate)
else if (ptrNpcStats.getSkill(i).getProgress() != NpcStats()->mSkills[i].mProgress) else if (ptrNpcStats.getSkill(i).getProgress() != NpcStats()->mSkills[i].mProgress)
{ {
ptrNpcStats.getSkill(i).writeState(NpcStats()->mSkills[i]); ptrNpcStats.getSkill(i).writeState(NpcStats()->mSkills[i]);
} }
} }
for (int i = 0; i < 8; i++) for (int i = 0; i < 8; i++)
@ -421,7 +421,7 @@ void LocalPlayer::updateEquipment(bool forceUpdate)
void LocalPlayer::updateInventory(bool forceUpdate) void LocalPlayer::updateInventory(bool forceUpdate)
{ {
static bool invChanged = false; static bool invChanged = false;
if (forceUpdate) if (forceUpdate)
invChanged = true; invChanged = true;
@ -453,7 +453,7 @@ void LocalPlayer::updateInventory(bool forceUpdate)
} }
} }
} }
if (!invChanged) if (!invChanged)
{ {
for (MWWorld::ContainerStoreIterator iter(ptrInventory.begin()); iter != ptrInventory.end(); ++iter) for (MWWorld::ContainerStoreIterator iter(ptrInventory.begin()); iter != ptrInventory.end(); ++iter)
@ -848,7 +848,7 @@ void LocalPlayer::sendInventory()
void LocalPlayer::sendSpellAddition(std::string id) void LocalPlayer::sendSpellAddition(std::string id)
{ {
spellbook.spells.clear(); spellbook.spells.clear();
mwmp::Spell spell; mwmp::Spell spell;
spell.id = id; spell.id = id;
spellbook.spells.push_back(spell); spellbook.spells.push_back(spell);

@ -53,8 +53,6 @@ namespace mwmp
void prepareAttack(Attack::TYPE type, bool state); void prepareAttack(Attack::TYPE type, bool state);
private: private:
Networking *getNetworking(); Networking *getNetworking();
MWWorld::Ptr getPlayerPtr(); MWWorld::Ptr getPlayerPtr();

@ -79,7 +79,7 @@ void Networking::update()
LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "A connection is incoming."); LOG_MESSAGE_SIMPLE(Log::LOG_INFO, "A connection is incoming.");
break; break;
case ID_NO_FREE_INCOMING_CONNECTIONS: case ID_NO_FREE_INCOMING_CONNECTIONS:
errmsg = "The server is full."; errmsg = "The server is full.";
break; break;
case ID_DISCONNECTION_NOTIFICATION: case ID_DISCONNECTION_NOTIFICATION:
errmsg = "We have been disconnected."; errmsg = "We have been disconnected.";

@ -26,7 +26,7 @@ namespace mwmp
ESM::Cell cell; ESM::Cell cell;
ESM::CellRef cellRef; ESM::CellRef cellRef;
ESM::Position pos; ESM::Position pos;
int count; int count;
int state; int state;
int lockLevel; int lockLevel;

@ -23,9 +23,9 @@ void PacketInventory::Packet(RakNet::BitStream *bs, BasePlayer *player, bool sen
player->inventory.items.clear(); player->inventory.items.clear();
else else
player->inventory.count = (unsigned int) (player->inventory.items.size()); player->inventory.count = (unsigned int) (player->inventory.items.size());
RW(player->inventory.count, send); RW(player->inventory.count, send);
for (int i = 0; i < player->inventory.count; i++) for (int i = 0; i < player->inventory.count; i++)
{ {
Item item; Item item;

@ -19,7 +19,7 @@ void PacketSpellbook::Packet(RakNet::BitStream *bs, BasePlayer *player, bool sen
player->spellbook.spells.clear(); player->spellbook.spells.clear();
else else
player->spellbook.count = (unsigned int) (player->spellbook.spells.size()); player->spellbook.count = (unsigned int) (player->spellbook.spells.size());
RW(player->spellbook.count, send); RW(player->spellbook.count, send);
for (int i = 0; i < player->spellbook.count; i++) for (int i = 0; i < player->spellbook.count; i++)

Loading…
Cancel
Save