Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite034fa5

Browse files
fixup! Introducing ErrorCode
1 parent57050bf commite034fa5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎api/ErrorCodes.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ enum : error_t {
9090
};
9191

9292
/* Error Codes:
93-
* In Arduino if a function returns1 is considered to haverun successfully,
94-
* any value different from1 is consideredan error.
93+
* In Arduino if a function returns0 is considered to havefailed,
94+
*whileany value different from0 is consideredsuccess.
9595
* Errors are generally represented with an int type that may vary in size depending on the platform.
9696
* For this reason in this representation error_t type is defined with an integer type with a defined size.
9797
*/
9898
classErrorCode {
9999
public:
100-
constexprErrorCode(int value): error(value==1? ArduinoSuccess : ArduinoError) {}
100+
constexprErrorCode(int value): error(value!=0? ArduinoSuccess : ArduinoError) {}
101101
constexprErrorCode(error_t value): error(value) {}
102102
consterror_t error;
103103

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp