Skip to content

Commit c10c516

Browse files
committed
Changed initialization of Winapi C struct, refactored comments.
1 parent b5b1398 commit c10c516

File tree

1 file changed

+5
-12
lines changed

1 file changed

+5
-12
lines changed

XMapLib/SendMouseInput.h

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,11 @@ namespace sds::Utilities
88
/// </summary>
99
class SendMouseInput
1010
{
11-
INPUT m_mouse_move_input = {};
11+
INPUT m_mouse_move_input{};
1212
public:
13-
/// <summary>
14-
/// Default Constructor
15-
/// </summary>
13+
/// <summary>Default Constructor</summary>
1614
SendMouseInput()
1715
{
18-
memset(&m_mouse_move_input, 0, sizeof(INPUT));
1916
m_mouse_move_input.type = INPUT_MOUSE;
2017
m_mouse_move_input.mi.dwFlags = MOUSEEVENTF_MOVE;
2118
}
@@ -24,9 +21,7 @@ namespace sds::Utilities
2421
SendMouseInput& operator=(const SendMouseInput& other) = delete;
2522
SendMouseInput& operator=(SendMouseInput&& other) = delete;
2623
~SendMouseInput() = default;
27-
/// <summary>
28-
/// Sends mouse movement specified by X and Y number of pixels to move.
29-
/// </summary>
24+
/// <summary>Sends mouse movement specified by X and Y number of pixels to move.</summary>
3025
/// <param name="x">number of pixels in X</param>
3126
/// <param name="y">number of pixels in Y</param>
3227
void SendMouseMove(const int x, const int y)
@@ -37,10 +32,8 @@ namespace sds::Utilities
3732
//Finally, send the input
3833
CallSendInput(&m_mouse_move_input, 1);
3934
}
40-
/// <summary>
41-
/// One member function calls SendInput with the eventual built INPUT struct.
42-
/// This is useful for debugging or re-routing the output for logging/testing of a real-time system.
43-
/// </summary>
35+
/// <summary>One member function calls SendInput with the eventual built INPUT struct.
36+
/// This is useful for debugging or re-routing the output for logging/testing of a real-time system.</summary>
4437
/// <param name="inp">Pointer to first element of INPUT array.</param>
4538
/// <param name="numSent">Number of elements in the array to send.</param>
4639
UINT CallSendInput(INPUT* inp, size_t numSent) const

0 commit comments

Comments
 (0)