@@ -621,16 +621,16 @@ namespace DiscordCoreInternal {
621621#else
622622 while ((result == 0 || errno != EWOULDBLOCK) && !token.stop_requested ()) {
623623#endif
624- result =
625- sendto ( this -> socket , connectionString. data (), connectionString. size (), 0 , this ->address ->ai_addr , this -> address -> ai_addrlen );
624+ result = sendto ( this -> socket , connectionString. data (), static_cast < int32_t >(connectionString. size ()), 0 , this -> address -> ai_addr ,
625+ static_cast < int32_t >( this ->address ->ai_addrlen ) );
626626 }
627627 result = 0 ;
628628#ifdef _WIN32
629629 while ((result == 0 || WSAGetLastError () == WSAEWOULDBLOCK) && !token.stop_requested ()) {
630630#else
631631 while ((result == 0 || errno != EWOULDBLOCK) && !token.stop_requested ()) {
632632#endif
633- result = recvfrom (this ->socket , connectionString.data (), connectionString.size (), 0 , this ->address ->ai_addr ,
633+ result = recvfrom (this ->socket , connectionString.data (), static_cast < int32_t >( connectionString.size () ), 0 , this ->address ->ai_addr ,
634634 reinterpret_cast <socklen_t *>(&this ->address ->ai_addrlen ));
635635 }
636636 }
@@ -642,7 +642,7 @@ namespace DiscordCoreInternal {
642642 }
643643 return false ;
644644 }
645- if (auto result = bind (this ->socket , this ->address ->ai_addr , this ->address ->ai_addrlen ); result != 0 ) {
645+ if (auto result = bind (this ->socket , this ->address ->ai_addr , static_cast < int32_t >( this ->address ->ai_addrlen ) ); result != 0 ) {
646646 if (this ->doWePrintErrors ) {
647647 cout << reportError (" DatagramSocketClient::connect::bind(), to: " + baseUrlNew) << endl;
648648 }
@@ -657,7 +657,7 @@ namespace DiscordCoreInternal {
657657#else
658658 while ((result == 0 || errno != EWOULDBLOCK) && !token.stop_requested ()) {
659659#endif
660- result = recvfrom (this ->socket , connectionString.data (), connectionString.size (), 0 , this ->address ->ai_addr ,
660+ result = recvfrom (this ->socket , connectionString.data (), static_cast < int32_t >( connectionString.size () ), 0 , this ->address ->ai_addr ,
661661 reinterpret_cast <socklen_t *>(&this ->address ->ai_addrlen ));
662662 }
663663 connectionString = " connected1" ;
@@ -667,8 +667,8 @@ namespace DiscordCoreInternal {
667667#else
668668 while ((result == 0 || errno != EWOULDBLOCK) && !token.stop_requested ()) {
669669#endif
670- result =
671- sendto ( this -> socket , connectionString. data (), connectionString. size (), 0 , this ->address ->ai_addr , this -> address -> ai_addrlen );
670+ result = sendto ( this -> socket , connectionString. data (), static_cast < int32_t >(connectionString. size ()), 0 , this -> address -> ai_addr ,
671+ static_cast < int32_t >( this ->address ->ai_addrlen ) );
672672 }
673673 }
674674 }
@@ -775,7 +775,7 @@ namespace DiscordCoreInternal {
775775 if (this ->outputBuffer .getUsedSpace () > 0 ) {
776776 auto bytesToWrite{ this ->outputBuffer .getCurrentTail ()->getUsedSpace () };
777777 auto writtenBytes{ sendto (this ->socket , this ->outputBuffer .getCurrentTail ()->getCurrentTail (), static_cast <int32_t >(bytesToWrite), 0 ,
778- this ->address ->ai_addr , this ->address ->ai_addrlen ) };
778+ this ->address ->ai_addr , static_cast < int32_t >( this ->address ->ai_addrlen ) ) };
779779#ifdef _WIN32
780780 if (writtenBytes < 0 && WSAGetLastError () != WSAEWOULDBLOCK) {
781781#else
0 commit comments