mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Fixed lots of warnings.
Disabled the following (for MSVC only) that couldn't (or shouldn't) be fixed. 4003: not enough actual parameters for macro 'identifier' 4250: 'class1' : inherits 'class2::member' via dominance 4251: 'type' : class 'type1' needs to have dll-interface to be used by clients of class 'type2' 4275: non dll-interface class 'type1' used as base for dll-interface class 'type2'
This commit is contained in:
@@ -299,6 +299,7 @@ void CVCMIServer::connectionAccepted(const boost::system::error_code & ec)
|
||||
}
|
||||
catch(std::exception & e)
|
||||
{
|
||||
(void)e;
|
||||
upcomingConnection.reset();
|
||||
logNetwork->info("I guess it was just my imagination!");
|
||||
}
|
||||
@@ -328,11 +329,13 @@ void CVCMIServer::threadHandleClient(std::shared_ptr<CConnection> c)
|
||||
}
|
||||
catch(boost::system::system_error & e)
|
||||
{
|
||||
(void)e;
|
||||
if(state != EServerState::LOBBY)
|
||||
gh->handleClientDisconnection(c);
|
||||
}
|
||||
catch(const std::exception & e)
|
||||
{
|
||||
(void)e;
|
||||
boost::unique_lock<boost::recursive_mutex> queueLock(mx);
|
||||
logNetwork->error("%s dies... \nWhat happened: %s", c->toString(), e.what());
|
||||
}
|
||||
@@ -682,7 +685,7 @@ void CVCMIServer::optionNextCastle(PlayerColor player, int dir)
|
||||
else
|
||||
{
|
||||
assert(dir >= -1 && dir <= 1); //othervice std::advance may go out of range
|
||||
auto iter = allowed.find(cur);
|
||||
auto iter = allowed.find((ui8)cur);
|
||||
std::advance(iter, dir);
|
||||
cur = *iter;
|
||||
}
|
||||
@@ -730,14 +733,14 @@ void CVCMIServer::optionNextHero(PlayerColor player, int dir)
|
||||
|
||||
if(s.hero == PlayerSettings::RANDOM) // first/last available
|
||||
{
|
||||
int max = VLC->heroh->heroes.size(),
|
||||
int max = static_cast<int>(VLC->heroh->heroes.size()),
|
||||
min = 0;
|
||||
s.hero = nextAllowedHero(player, min, max, 0, dir);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(dir > 0)
|
||||
s.hero = nextAllowedHero(player, s.hero, VLC->heroh->heroes.size(), 1, dir);
|
||||
s.hero = nextAllowedHero(player, s.hero, (int)VLC->heroh->heroes.size(), 1, dir);
|
||||
else
|
||||
s.hero = nextAllowedHero(player, -1, s.hero, 1, dir); // min needs to be -1 -- hero at index 0 would be skipped otherwise
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user