Merge pull request #4204 from gudnimg/ReportingRAII-opt

optimisation: always inline `ReportingRAII`
This commit is contained in:
3d-gussner 2023-05-19 19:44:41 +02:00 committed by GitHub
commit d20dc8256a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -194,11 +194,11 @@ void MMU2::CheckFINDARunout() {
struct ReportingRAII {
CommandInProgress cip;
explicit inline ReportingRAII(CommandInProgress cip)
explicit inline __attribute__((always_inline)) ReportingRAII(CommandInProgress cip)
: cip(cip) {
BeginReport(cip, (uint16_t)ProgressCode::EngagingIdler);
}
inline ~ReportingRAII() {
inline __attribute__((always_inline)) ~ReportingRAII() {
EndReport(cip, (uint16_t)ProgressCode::OK);
}
};