VS2017 typecast fixes

This commit is contained in:
Jonathan Campbell
2019-07-05 21:50:21 -07:00
parent abc0377465
commit 9cc78b15aa
4 changed files with 7 additions and 7 deletions

View File

@@ -305,7 +305,7 @@ void CDirectSerial::updatePortConfig (Bit16u divider, Bit8u lcr) {
else stopbits = SERIAL_2STOP;
} else stopbits = SERIAL_1STOP;
if(!SERIAL_setCommParameters(comport, baudrate, (char)parity, (char)stopbits, (char)bytelength)) {
if(!SERIAL_setCommParameters(comport, (int)baudrate, (char)parity, (char)stopbits, (char)bytelength)) {
#if SERIAL_DEBUG
log_ser(dbg_aux,"Serial port settings not supported by host." );
#endif

View File

@@ -186,7 +186,7 @@ bool TCPClientSocket::GetRemoteAddressString(Bit8u* buffer) {
bool TCPClientSocket::ReceiveArray(Bit8u* data, Bitu* size) {
if(SDLNet_CheckSockets(listensocketset,0))
{
Bits retval = SDLNet_TCP_Recv(mysock, data, *size);
Bits retval = SDLNet_TCP_Recv(mysock, data, (int)(*size));
if(retval<1) {
isopen=false;
*size=0;
@@ -227,7 +227,7 @@ bool TCPClientSocket::Putchar(Bit8u data) {
}
bool TCPClientSocket::SendArray(Bit8u* data, Bitu bufsize) {
if((Bitu)SDLNet_TCP_Send(mysock, data, bufsize) != bufsize) {
if((Bitu)SDLNet_TCP_Send(mysock, data, (int)bufsize) != (int)bufsize) {
isopen=false;
return false;
}
@@ -241,7 +241,7 @@ bool TCPClientSocket::SendByteBuffered(Bit8u data) {
sendbuffer[sendbufferindex]=data;
sendbufferindex=0;
if((Bitu)SDLNet_TCP_Send(mysock, sendbuffer, sendbuffersize) != sendbuffersize) {
if((Bitu)SDLNet_TCP_Send(mysock, sendbuffer, (int)sendbuffersize) != sendbuffersize) {
isopen=false;
return false;
}
@@ -273,7 +273,7 @@ bool TCPClientSocket::SendArrayBuffered(Bit8u* data, Bitu bufsize) {
void TCPClientSocket::FlushBuffer() {
if(sendbufferindex) {
if((Bitu)SDLNet_TCP_Send(mysock, sendbuffer,
sendbufferindex) != sendbufferindex) {
(int)sendbufferindex) != sendbufferindex) {
isopen=false;
return;
}

View File

@@ -317,8 +317,8 @@ static void SN76496_set_gain(struct SN76496 *R, int gain) {
void SN76496Reset(struct SN76496 *R, Bitu Clock, Bitu sample_rate) {
Bitu i;
R->SampleRate = sample_rate;
SN76496_set_clock(R,Clock);
R->SampleRate = (int)sample_rate;
SN76496_set_clock(R,(int)Clock);
for (i = 0;i < 4;i++) R->Volume[i] = 0;
R->LastRegister = 0;
for (i = 0;i < 8;i+=2)

Binary file not shown.