Fix bug in templated attach function

The arguments passed to `Callback<void()>`'s constructor were the wrong way round,
thus preventing the `attach` function from being instantiated.
This patch corrects that by switching the order of the arguments.
pull/9344/head
Pharap 2019-01-10 21:16:13 +00:00 committed by GitHub
parent d20b59153a
commit b6aba2f985
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -126,8 +126,8 @@ public:
*/
template<typename T>
void attach(T* tptr, void (T::*mptr)(void)) {
if((mptr != NULL) && (tptr != NULL)) {
rx = Callback<void()>(mptr, tptr);
if((tptr != NULL) && (mptr != NULL)) {
rx = Callback<void()>(tptr, mptr);
}
}