refactor: replace SInt8 with int8_t
This commit is contained in:
@ -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));
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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++) {
|
||||
|
||||
Reference in New Issue
Block a user