Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: target-freescale
Fork of mbed-hal by
Diff: api/FunctionPointer.h
- Revision:
- 15:1ce23ed6859a
- Parent:
- 14:4af7fef9cf08
- Child:
- 17:fe43695d093a
diff -r 4af7fef9cf08 -r 1ce23ed6859a api/FunctionPointer.h --- a/api/FunctionPointer.h Fri Apr 01 01:00:18 2016 -0500 +++ b/api/FunctionPointer.h Fri Apr 01 01:16:52 2016 -0500 @@ -82,7 +82,7 @@ * @param function The static function to attach */ template <typename T> - void attach(T *object, R (*function)(A1, A2, A3, A4)) { + void attach(T *object, R (*function)(T*, A1, A2, A3, A4)) { _object = static_cast<void*>(object); *reinterpret_cast<R (**)(T*, A1)>(_function) = function; _thunk = &FuncPtr::boundthunk<T>; @@ -132,7 +132,7 @@ #endif private: // Static thunks for various function types - static R staticthunk(void *eh, void *func, A1 a1, A2 a2, A3 a3, A4 a4) { + static R staticthunk(void*, void *func, A1 a1, A2 a2, A3 a3, A4 a4) { R (*f)(A1, A2, A3, A4) = *reinterpret_cast<R (**)(A1, A2, A3, A4)>(func); return f(a1, a2, a3, a4); } @@ -226,7 +226,7 @@ * @param function The static function to attach */ template <typename T> - void attach(T *object, R (*function)(A1, A2, A3)) { + void attach(T *object, R (*function)(T*, A1, A2, A3)) { _object = static_cast<void*>(object); *reinterpret_cast<R (**)(T*, A1)>(_function) = function; _thunk = &FuncPtr::boundthunk<T>; @@ -276,7 +276,7 @@ #endif private: // Static thunks for various function types - static R staticthunk(void *eh, void *func, A1 a1, A2 a2, A3 a3) { + static R staticthunk(void*, void *func, A1 a1, A2 a2, A3 a3) { R (*f)(A1, A2, A3) = *reinterpret_cast<R (**)(A1, A2, A3)>(func); return f(a1, a2, a3); } @@ -370,7 +370,7 @@ * @param function The static function to attach */ template <typename T> - void attach(T *object, R (*function)(A1, A2)) { + void attach(T *object, R (*function)(T*, A1, A2)) { _object = static_cast<void*>(object); *reinterpret_cast<R (**)(T*, A1)>(_function) = function; _thunk = &FuncPtr::boundthunk<T>; @@ -420,7 +420,7 @@ #endif private: // Static thunks for various function types - static R staticthunk(void *eh, void *func, A1 a1, A2 a2) { + static R staticthunk(void*, void *func, A1 a1, A2 a2) { R (*f)(A1, A2) = *reinterpret_cast<R (**)(A1, A2)>(func); return f(a1, a2); } @@ -514,7 +514,7 @@ * @param function The static function to attach */ template <typename T> - void attach(T *object, R (*function)(A1)) { + void attach(T *object, R (*function)(T*, A1)) { _object = static_cast<void*>(object); *reinterpret_cast<R (**)(T*, A1)>(_function) = function; _thunk = &FuncPtr::boundthunk<T>; @@ -564,7 +564,7 @@ #endif private: // Static thunks for various function types - static R staticthunk(void *eh, void *func, A1 a1) { + static R staticthunk(void*, void *func, A1 a1) { R (*f)(A1) = *reinterpret_cast<R (**)(A1)>(func); return f(a1); } @@ -658,7 +658,7 @@ * @param function The static function to attach */ template <typename T> - void attach(T *object, R (*function)()) { + void attach(T *object, R (*function)(T*)) { _object = static_cast<void*>(object); *reinterpret_cast<R (**)(T*)>(_function) = function; _thunk = &FuncPtr::boundthunk<T>; @@ -708,7 +708,7 @@ #endif private: // Static thunks for various function types - static R staticthunk(void *eh, void *func) { + static R staticthunk(void*, void *func) { R (*f)() = *reinterpret_cast<R (**)()>(func); return f(); }