Skip to content

Commit 70e9afa

Browse files
committed
Const correctness
1 parent 0b3f4fe commit 70e9afa

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

MouseTo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ MouseToClass::MouseToClass() {
1111
}
1212

1313

14-
void MouseToClass::setTarget(int targetXinput, int targetYinput, const boolean homeFirst) {
14+
void MouseToClass::setTarget(const int targetXinput, const int targetYinput, const boolean homeFirst) {
1515
//convert screen coordinates to Arduino coordinates
1616
targetX = targetXinput * correctionFactor;
1717
targetY = targetYinput * correctionFactor;
@@ -30,7 +30,7 @@ int MouseToClass::getTargetY() {
3030

3131

3232
//used for compatibility with the previous API
33-
boolean MouseToClass::moveTo(int targetXinput, int targetYinput) {
33+
boolean MouseToClass::moveTo(const int targetXinput, const int targetYinput) {
3434
setTarget(targetXinput, targetYinput);
3535
return move();
3636
}

MouseTo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
class MouseToClass {
1111
public:
1212
MouseToClass();
13-
void setTarget(int targetXinput, int targetYinput, const boolean homeFirst = true);
13+
void setTarget(const int targetXinput, const int targetYinput, const boolean homeFirst = true);
1414
int getTargetX();
1515
int getTargetY();
16-
boolean moveTo(int targetXinput, int targetYinput);
16+
boolean moveTo(const int targetXinput, const int targetYinput);
1717
boolean move();
1818
void setScreenResolution(const int x, const int y);
1919
unsigned int getScreenResolutionX();

0 commit comments

Comments
 (0)