Skip to content

Commit

Permalink
Merge pull request facebookarchive#5 from jaynus/patch_upstream
Browse files Browse the repository at this point in the history
Fixes build errors in MSVC 2014/2015 compiling with latest CMake and …
  • Loading branch information
Luke1410 committed Aug 2, 2017
2 parents e40de85 + c9ddb6a commit 6153db0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Lib/LibStatic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ IF(WIN32 AND NOT UNIX)

IF(NOT ${CMAKE_GENERATOR} STREQUAL "MSYS Makefiles")

IF( MSVC10 OR MSVC11 OR MSVC12 )
IF( MSVC10 OR MSVC11 OR MSVC12 OR MSVC14 )
set_target_properties(RakNetLibStatic PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB:\"LIBCD.lib LIBCMTD.lib MSVCRT.lib\"" )
ELSE()
set_target_properties(RakNetLibStatic PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB:"LIBCD.lib LIBCMTD.lib MSVCRT.lib"" )
Expand Down
4 changes: 2 additions & 2 deletions Source/CCRakNetSlidingWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ static const CCTimeType SYN=10000;

#include "MTUSize.h"
#include <stdio.h>
#include <math.h>
#include <cmath>
#include <stdlib.h>
#include "RakAssert.h"
#include "RakAlloca.h"
Expand Down Expand Up @@ -218,7 +218,7 @@ void CCRakNetSlidingWindow::OnAck(CCTimeType curTime, CCTimeType rtt, bool hasBA
double d = .05;
double difference = rtt - estimatedRTT;
estimatedRTT = estimatedRTT + d * difference;
deviationRtt = deviationRtt + d * (abs(difference) - deviationRtt);
deviationRtt = deviationRtt + d * (std::abs(difference) - deviationRtt);
}

_isContinuousSend=isContinuousSend;
Expand Down

0 comments on commit 6153db0

Please sign in to comment.