Adding clear parameter to getResult

This commit is contained in:
Rodrigo Alfonso
2025-01-22 07:36:58 -03:00
parent 535d8ce536
commit 6bf0b3fe55

View File

@@ -515,9 +515,15 @@ class LinkCableMultiboot {
State getState() { return state; }
/**
* @brief Returns the result of the last operation.
* @brief Returns the result of the last operation. After this
* call, the result is cleared if `clear` is `true` (default behavior).
* @param clear Whether it should clear the result or not.
*/
Result getResult() { return result; }
Result getResult(bool clear = true) {
Result _result = result;
result = NONE;
return result;
}
/**
* @brief Returns the number of connected players (`1~4`).