refactor: replace SInt8 with int8_t
This commit is contained in:
parent
ab61fcc007
commit
8ea20cf6da
4 changed files with 6 additions and 7 deletions
|
|
@ -652,7 +652,7 @@ void ServerProxy::mouseDown()
|
||||||
flushCompressedMouse();
|
flushCompressedMouse();
|
||||||
|
|
||||||
// parse
|
// parse
|
||||||
SInt8 id;
|
int8_t id;
|
||||||
ProtocolUtil::readf(m_stream, kMsgDMouseDown + 4, &id);
|
ProtocolUtil::readf(m_stream, kMsgDMouseDown + 4, &id);
|
||||||
LOG((CLOG_DEBUG1 "recv mouse down id=%d", id));
|
LOG((CLOG_DEBUG1 "recv mouse down id=%d", id));
|
||||||
|
|
||||||
|
|
@ -666,7 +666,7 @@ void ServerProxy::mouseUp()
|
||||||
flushCompressedMouse();
|
flushCompressedMouse();
|
||||||
|
|
||||||
// parse
|
// parse
|
||||||
SInt8 id;
|
int8_t id;
|
||||||
ProtocolUtil::readf(m_stream, kMsgDMouseUp + 4, &id);
|
ProtocolUtil::readf(m_stream, kMsgDMouseUp + 4, &id);
|
||||||
LOG((CLOG_DEBUG1 "recv mouse up id=%d", id));
|
LOG((CLOG_DEBUG1 "recv mouse up id=%d", id));
|
||||||
|
|
||||||
|
|
@ -752,7 +752,7 @@ void ServerProxy::mouseWheel()
|
||||||
void ServerProxy::screensaver()
|
void ServerProxy::screensaver()
|
||||||
{
|
{
|
||||||
// parse
|
// parse
|
||||||
SInt8 on;
|
int8_t on;
|
||||||
ProtocolUtil::readf(m_stream, kMsgCScreenSaver + 4, &on);
|
ProtocolUtil::readf(m_stream, kMsgCScreenSaver + 4, &on);
|
||||||
LOG((CLOG_DEBUG1 "recv screen saver on=%d", on));
|
LOG((CLOG_DEBUG1 "recv screen saver on=%d", on));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,6 @@
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
#include <CoreServices/CoreServices.h>
|
#include <CoreServices/CoreServices.h>
|
||||||
#else
|
#else
|
||||||
using SInt8 = signed TYPE_OF_SIZE_1;
|
|
||||||
using SInt16 = signed TYPE_OF_SIZE_2;
|
using SInt16 = signed TYPE_OF_SIZE_2;
|
||||||
using SInt32 = signed TYPE_OF_SIZE_4;
|
using SInt32 = signed TYPE_OF_SIZE_4;
|
||||||
using UInt8 = unsigned TYPE_OF_SIZE_1;
|
using UInt8 = unsigned TYPE_OF_SIZE_1;
|
||||||
|
|
|
||||||
|
|
@ -236,7 +236,7 @@ private:
|
||||||
void overwrite(UInt32 buttons);
|
void overwrite(UInt32 buttons);
|
||||||
|
|
||||||
bool test(UInt32 button) const;
|
bool test(UInt32 button) const;
|
||||||
SInt8 getFirstButtonDown() const;
|
int8_t getFirstButtonDown() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::bitset<NumButtonIDs> m_buttons;
|
std::bitset<NumButtonIDs> m_buttons;
|
||||||
|
|
|
||||||
|
|
@ -468,7 +468,7 @@ void OSXScreen::postMouseEvent(CGPoint &pos) const
|
||||||
|
|
||||||
CGEventType type = kCGEventMouseMoved;
|
CGEventType type = kCGEventMouseMoved;
|
||||||
|
|
||||||
SInt8 button = m_buttonState.getFirstButtonDown();
|
int8_t button = m_buttonState.getFirstButtonDown();
|
||||||
if (button != -1) {
|
if (button != -1) {
|
||||||
MouseButtonEventMapType thisButtonType = MouseButtonEventMap[button];
|
MouseButtonEventMapType thisButtonType = MouseButtonEventMap[button];
|
||||||
type = thisButtonType[kMouseButtonDragged];
|
type = thisButtonType[kMouseButtonDragged];
|
||||||
|
|
@ -1883,7 +1883,7 @@ bool OSXScreen::MouseButtonState::test(UInt32 button) const
|
||||||
return m_buttons.test(button);
|
return m_buttons.test(button);
|
||||||
}
|
}
|
||||||
|
|
||||||
SInt8 OSXScreen::MouseButtonState::getFirstButtonDown() const
|
int8_t OSXScreen::MouseButtonState::getFirstButtonDown() const
|
||||||
{
|
{
|
||||||
if (m_buttons.any()) {
|
if (m_buttons.any()) {
|
||||||
for (unsigned short button = 0; button < m_buttons.size(); button++) {
|
for (unsigned short button = 0; button < m_buttons.size(); button++) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue