Index: src/OFOnce.h ================================================================== --- src/OFOnce.h +++ src/OFOnce.h @@ -31,10 +31,12 @@ OF_ASSUME_NONNULL_BEGIN /** @file */ +typedef void (*OFOnceFunction)(void); + #ifdef __cplusplus extern "C" { #endif /** * @brief Executes the specified function exactly once in the application's @@ -42,11 +44,11 @@ * * @param control An OFOnceControl. This should be a static variable * preinitialized to `OFOnceControlInitValue`. * @param function The function to execute once */ -extern void OFOnce(OFOnceControl *control, void (*function)(void)); +extern void OFOnce(OFOnceControl *control, OFOnceFunction function); #ifdef __cplusplus } #endif OF_ASSUME_NONNULL_END