Housekeeping

This commit is contained in:
scawful
2023-12-17 21:02:28 -05:00
parent 10785357ef
commit 20515d2f0b
11 changed files with 66 additions and 73 deletions

View File

@@ -87,6 +87,18 @@
} \
type_variable_name = std::move(*error_or_value);
#define ASSIGN_OR_LOG_ERROR(type_variable_name, expression) \
ASSIGN_OR_LOG_ERROR_IMPL(APPEND_NUMBER(error_or_value, __LINE__), \
type_variable_name, expression)
#define ASSIGN_OR_LOG_ERROR_IMPL(error_or_value, type_variable_name, \
expression) \
auto error_or_value = expression; \
if (!error_or_value.ok()) { \
std::cout << error_or_value.status().ToString() << std::endl; \
} \
type_variable_name = std::move(*error_or_value);
#define APPEND_NUMBER(expression, number) \
APPEND_NUMBER_INNER(expression, number)

View File

@@ -138,7 +138,6 @@ void Controller::OnInput() {
break;
}
break;
default:
break;
}