Skip to content

Commit

Permalink
Made it defensive! Thanks, Nick.
Browse files Browse the repository at this point in the history
  • Loading branch information
berndporr committed Feb 1, 2025
1 parent 4629378 commit f313ff9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CppTimerStdFuncCallback.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CppTimerCallback : public CppTimer {
}

void timerEvent() {
if (!(callbackFunction == nullptr)) {
if (nullptr != callbackFunction) {
callbackFunction();
}
}
Expand Down
2 changes: 1 addition & 1 deletion demo_stdfunccallback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class ReceiverClass1 {
class ReceiverClass2 {
public:
void run() {
fprintf(stdout,"Buh! \n");
fprintf(stdout,"BUH! \n");
fflush(stdout);
}
};
Expand Down

0 comments on commit f313ff9

Please sign in to comment.