Running astyle.

This commit is contained in:
lotodore
2013-12-19 14:27:24 +01:00
parent 2bc3567485
commit 6042d68454
4 changed files with 22 additions and 20 deletions
+13 -6
View File
@@ -65,12 +65,19 @@ class PingData
public:
PingData() : pingTimer(boost::posix_time::time_duration(0, 0, 0), boost::timers::portable::microsec_timer::manual_start) {}
unsigned MinPing() {return *std::min_element(pingValues.begin(), pingValues.end());}
unsigned MaxPing() {return *std::max_element(pingValues.begin(), pingValues.end());}
unsigned AveragePing() {return std::accumulate(pingValues.begin(), pingValues.end(), 0) / (unsigned)pingValues.size();}
void StartPing() {pingTimer.start();}
void EndPing()
{
unsigned MinPing() {
return *std::min_element(pingValues.begin(), pingValues.end());
}
unsigned MaxPing() {
return *std::max_element(pingValues.begin(), pingValues.end());
}
unsigned AveragePing() {
return std::accumulate(pingValues.begin(), pingValues.end(), 0) / (unsigned)pingValues.size();
}
void StartPing() {
pingTimer.start();
}
void EndPing() {
if (pingTimer.is_running()) {
pingValues.push_back((unsigned)pingTimer.elapsed().total_milliseconds());
if (pingValues.size() > SIZE_PING_BACKLOG) {
+1 -2
View File
@@ -1771,8 +1771,7 @@ ClientStateRunHand::InternalHandlePacket(boost::shared_ptr<ClientThread> client,
client->GetClientLog()->transformPlayerActionLog(PlayerAction(netActionDone.playeraction())),
netActionDone.totalplayerbet() - tmpPlayer->getMySet()
);
if (tmpPlayer->getMyID() == 0)
{
if (tmpPlayer->getMyID() == 0) {
client->EndPing();
}
}
+2 -2
View File
@@ -79,8 +79,8 @@ ServerAcceptWebHelper::validate(websocketpp::connection_hdl hdl)
server::connection_ptr con = m_webSocketServer->get_con_from_hdl(hdl);
if ((m_webSocketResource.empty() || con->get_resource() == m_webSocketResource)
&& (m_webSocketOrigin.empty() ||
(con->get_origin() != "null" &&
(con->get_origin() == "http://" + m_webSocketOrigin || con->get_origin() == "http://www." + m_webSocketOrigin)))) {
(con->get_origin() != "null" &&
(con->get_origin() == "http://" + m_webSocketOrigin || con->get_origin() == "http://www." + m_webSocketOrigin)))) {
retVal = true;
}
return retVal;