mirror of
https://github.com/yuzu-emu/discord-rpc.git
synced 2024-11-24 07:15:38 +01:00
squelch warnings in 64bit compile
This commit is contained in:
parent
7fe7e2ab53
commit
7324ae890c
@ -72,7 +72,7 @@ bool BaseConnection::Close()
|
|||||||
bool BaseConnection::Write(const void* data, size_t length)
|
bool BaseConnection::Write(const void* data, size_t length)
|
||||||
{
|
{
|
||||||
auto self = reinterpret_cast<BaseConnectionWin*>(this);
|
auto self = reinterpret_cast<BaseConnectionWin*>(this);
|
||||||
return ::WriteFile(self->pipe, data, length, nullptr, nullptr) == TRUE;
|
return ::WriteFile(self->pipe, data, (DWORD)length, nullptr, nullptr) == TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseConnection::Read(void* data, size_t length)
|
bool BaseConnection::Read(void* data, size_t length)
|
||||||
@ -81,7 +81,7 @@ bool BaseConnection::Read(void* data, size_t length)
|
|||||||
DWORD bytesAvailable = 0;
|
DWORD bytesAvailable = 0;
|
||||||
if (::PeekNamedPipe(self->pipe, nullptr, 0, nullptr, &bytesAvailable, nullptr)) {
|
if (::PeekNamedPipe(self->pipe, nullptr, 0, nullptr, &bytesAvailable, nullptr)) {
|
||||||
if (bytesAvailable >= length) {
|
if (bytesAvailable >= length) {
|
||||||
if (::ReadFile(self->pipe, data, length, nullptr, nullptr) == TRUE) {
|
if (::ReadFile(self->pipe, data, (DWORD)length, nullptr, nullptr) == TRUE) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -48,8 +48,8 @@ void RpcConnection::Open()
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sendFrame.opcode = Opcode::Handshake;
|
sendFrame.opcode = Opcode::Handshake;
|
||||||
sendFrame.length =
|
sendFrame.length = (uint32_t)JsonWriteHandshakeObj(
|
||||||
JsonWriteHandshakeObj(sendFrame.message, sizeof(sendFrame.message), RpcVersion, appId);
|
sendFrame.message, sizeof(sendFrame.message), RpcVersion, appId);
|
||||||
|
|
||||||
if (connection->Write(&sendFrame, sizeof(MessageFrameHeader) + sendFrame.length)) {
|
if (connection->Write(&sendFrame, sizeof(MessageFrameHeader) + sendFrame.length)) {
|
||||||
state = State::SentHandshake;
|
state = State::SentHandshake;
|
||||||
@ -73,7 +73,7 @@ bool RpcConnection::Write(const void* data, size_t length)
|
|||||||
{
|
{
|
||||||
sendFrame.opcode = Opcode::Frame;
|
sendFrame.opcode = Opcode::Frame;
|
||||||
memcpy(sendFrame.message, data, length);
|
memcpy(sendFrame.message, data, length);
|
||||||
sendFrame.length = length;
|
sendFrame.length = (uint32_t)length;
|
||||||
if (!connection->Write(&sendFrame, sizeof(MessageFrameHeader) + length)) {
|
if (!connection->Write(&sendFrame, sizeof(MessageFrameHeader) + length)) {
|
||||||
Close();
|
Close();
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user