Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

change abs to fabs #87

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Lib/LibStatic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ IF(WIN32 AND NOT UNIX)
IF(NOT ${CMAKE_GENERATOR} STREQUAL "MSYS Makefiles")

IF( MSVC10 OR MSVC11 OR MSVC12 )
set_target_properties(RakNetLibStatic PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB:\"LIBCD.lib LIBCMTD.lib MSVCRT.lib\"" )
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"" )
set_target_properties(RakNetLibStatic PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB:LIBCD.lib LIBCMTD.lib MSVCRT.lib" )
ENDIF()

ENDIF(NOT ${CMAKE_GENERATOR} STREQUAL "MSYS Makefiles")
Expand Down
2 changes: 1 addition & 1 deletion Source/CCRakNetSlidingWindow.cpp
Original file line number Diff line number Diff line change
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 * (fabs(difference) - deviationRtt);
}

_isContinuousSend=isContinuousSend;
Expand Down
20 changes: 10 additions & 10 deletions Source/NatPunchthroughClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -797,34 +797,34 @@ char *TestModeToString(NatPunchthroughClient::SendPing::TestMode tm)
switch (tm)
{
case NatPunchthroughClient::SendPing::TESTING_INTERNAL_IPS:
return "TESTING_INTERNAL_IPS";
return (char *) ("TESTING_INTERNAL_IPS");
break;
case NatPunchthroughClient::SendPing::WAITING_FOR_INTERNAL_IPS_RESPONSE:
return "WAITING_FOR_INTERNAL_IPS_RESPONSE";
return (char *) ("WAITING_FOR_INTERNAL_IPS_RESPONSE");
break;
// case NatPunchthroughClient::SendPing::SEND_WITH_TTL:
// return "SEND_WITH_TTL";
// return (char *) ("SEND_WITH_TTL");
// break;
case NatPunchthroughClient::SendPing::TESTING_EXTERNAL_IPS_FACILITATOR_PORT_TO_FACILITATOR_PORT:
return "TESTING_EXTERNAL_IPS_FACILITATOR_PORT_TO_FACILITATOR_PORT";
return (char *) ("TESTING_EXTERNAL_IPS_FACILITATOR_PORT_TO_FACILITATOR_PORT");
break;
case NatPunchthroughClient::SendPing::TESTING_EXTERNAL_IPS_1024_TO_FACILITATOR_PORT:
return "TESTING_EXTERNAL_IPS_1024_TO_FACILITATOR_PORT";
return (char *) ("TESTING_EXTERNAL_IPS_1024_TO_FACILITATOR_PORT");
break;
case NatPunchthroughClient::SendPing::TESTING_EXTERNAL_IPS_FACILITATOR_PORT_TO_1024:
return "TESTING_EXTERNAL_IPS_FACILITATOR_PORT_TO_1024";
return (char *) ("TESTING_EXTERNAL_IPS_FACILITATOR_PORT_TO_1024");
break;
case NatPunchthroughClient::SendPing::TESTING_EXTERNAL_IPS_1024_TO_1024:
return "TESTING_EXTERNAL_IPS_1024_TO_1024";
return (char *) ("TESTING_EXTERNAL_IPS_1024_TO_1024");
break;
case NatPunchthroughClient::SendPing::WAITING_AFTER_ALL_ATTEMPTS:
return "WAITING_AFTER_ALL_ATTEMPTS";
return (char *) ("WAITING_AFTER_ALL_ATTEMPTS");
break;
case NatPunchthroughClient::SendPing::PUNCHING_FIXED_PORT:
return "PUNCHING_FIXED_PORT";
return (char *) ("PUNCHING_FIXED_PORT");
break;
}
return "";
return (char *) ("");
}
void NatPunchthroughClient::SendOutOfBand(SystemAddress sa, MessageID oobId)
{
Expand Down
2 changes: 1 addition & 1 deletion Source/RakString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ WCHAR * RakString::ToWideChar(void)
if ( (sharedString->c_str == NULL) || (*sharedString->c_str == '\0') )
{
// Return empty string
return L"";
return (WCHAR *) (L"");
}

//
Expand Down