1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 02:51:27 +00:00

Fix more clang warnings.

This commit is contained in:
Darryl Pogue
2013-01-05 22:02:29 -08:00
parent 2af0a7f56e
commit c71bff3f21
9 changed files with 21 additions and 17 deletions

View File

@ -608,7 +608,7 @@ int plNetClientMgr::Update(double secs)
//
void plNetClientMgr::ICheckPendingStateLoad(double secs)
{
if (!fPendingLoads.empty() && GetFlagsBit( kPlayingGame ) || (GetFlagsBit(kLoadingInitialAgeState) && !GetFlagsBit(kNeedInitialAgeStateCount)))
if ((!fPendingLoads.empty() && GetFlagsBit(kPlayingGame)) || (GetFlagsBit(kLoadingInitialAgeState) && !GetFlagsBit(kNeedInitialAgeStateCount)))
{
PendingLoadsList::iterator it = fPendingLoads.begin();
while ( it!=fPendingLoads.end() )
@ -1198,8 +1198,8 @@ plString plNetClientMgr::GetPlayerNameById (unsigned playerId) const {
unsigned plNetClientMgr::GetPlayerIdByName (const plString & name) const {
// local case
if (0 == name.Compare(NetCommGetPlayer()->playerNameAnsi))
NetCommGetPlayer()->playerInt;
return NetCommGetPlayer()->playerInt;
unsigned n = TransportMgr().GetNumMembers();
for (unsigned i = 0; i < n; ++i)
if (plNetTransportMember * member = TransportMgr().GetMember(i))

View File

@ -157,7 +157,7 @@ void plNetClientMgr::ISendCCRPetition(plCCRPetitionMsg* petMsg)
info.AddValue( "Petition", "Language", plLocalization::GetLanguageName( plLocalization::GetLanguage() ) );
info.AddValue( "Petition", "AcctName", NetCommGetAccount()->accountNameAnsi );
char buffy[20];
sprintf( buffy, "%lu", GetPlayerID() );
sprintf(buffy, "%u", GetPlayerID());
info.AddValue( "Petition", "PlayerID", buffy );
info.AddValue( "Petition", "PlayerName", GetPlayerName() );

View File

@ -263,6 +263,9 @@ void plNetLinkingMgr::ExecNextOp () {
);
}
break;
default:
break;
}
s_opqueue.remove(op);
@ -1091,7 +1094,7 @@ uint8_t plNetLinkingMgr::IPreProcessLink(void)
info,
&childLink))
{
case hsFail:
case static_cast<uint8_t>(hsFail):
success = kLinkFailed;
break;
case false:

View File

@ -286,14 +286,14 @@ void plNetObjectDebugger::LogMsgIfMatch(const char* msg) const
char objName[128];
int i=0;
// copy objName token
while(*c && *c != ',' && *c != ' ' && i<127)
objName[i++] = *c++;
objName[i++] = *c++;
objName[i]=0;
DebugObjectList::const_iterator it = fDebugObjects.begin();
for( objName[0]; it != fDebugObjects.end(); it++)
for(; it != fDebugObjects.end(); it++)
{
if ((*it) && (*it)->StringMatches(objName))
{