refactor: replace SInt8 with int8_t

This commit is contained in:
sithlord48
2025-01-10 18:42:34 -05:00
committed by Nick Bolton
parent ab61fcc007
commit 8ea20cf6da
4 changed files with 6 additions and 7 deletions

View File

@ -652,7 +652,7 @@ void ServerProxy::mouseDown()
flushCompressedMouse();
// parse
SInt8 id;
int8_t id;
ProtocolUtil::readf(m_stream, kMsgDMouseDown + 4, &id);
LOG((CLOG_DEBUG1 "recv mouse down id=%d", id));
@ -666,7 +666,7 @@ void ServerProxy::mouseUp()
flushCompressedMouse();
// parse
SInt8 id;
int8_t id;
ProtocolUtil::readf(m_stream, kMsgDMouseUp + 4, &id);
LOG((CLOG_DEBUG1 "recv mouse up id=%d", id));
@ -752,7 +752,7 @@ void ServerProxy::mouseWheel()
void ServerProxy::screensaver()
{
// parse
SInt8 on;
int8_t on;
ProtocolUtil::readf(m_stream, kMsgCScreenSaver + 4, &on);
LOG((CLOG_DEBUG1 "recv screen saver on=%d", on));

View File

@ -84,7 +84,6 @@
#if defined(__APPLE__)
#include <CoreServices/CoreServices.h>
#else
using SInt8 = signed TYPE_OF_SIZE_1;
using SInt16 = signed TYPE_OF_SIZE_2;
using SInt32 = signed TYPE_OF_SIZE_4;
using UInt8 = unsigned TYPE_OF_SIZE_1;

View File

@ -236,7 +236,7 @@ private:
void overwrite(UInt32 buttons);
bool test(UInt32 button) const;
SInt8 getFirstButtonDown() const;
int8_t getFirstButtonDown() const;
private:
std::bitset<NumButtonIDs> m_buttons;

View File

@ -468,7 +468,7 @@ void OSXScreen::postMouseEvent(CGPoint &pos) const
CGEventType type = kCGEventMouseMoved;
SInt8 button = m_buttonState.getFirstButtonDown();
int8_t button = m_buttonState.getFirstButtonDown();
if (button != -1) {
MouseButtonEventMapType thisButtonType = MouseButtonEventMap[button];
type = thisButtonType[kMouseButtonDragged];
@ -1883,7 +1883,7 @@ bool OSXScreen::MouseButtonState::test(UInt32 button) const
return m_buttons.test(button);
}
SInt8 OSXScreen::MouseButtonState::getFirstButtonDown() const
int8_t OSXScreen::MouseButtonState::getFirstButtonDown() const
{
if (m_buttons.any()) {
for (unsigned short button = 0; button < m_buttons.size(); button++) {