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.
Fork of USBDevice_STM32F103 by
Revision 69:8d72761d52fd, committed 2016-11-25
- Comitter:
- devanlai
- Date:
- Fri Nov 25 18:26:37 2016 +0000
- Parent:
- 67:39396cc073f2
- Child:
- 70:e410de636542
- Commit message:
- Fix the valid-callback check to use the Callback class's bool overload
Changed in this revision
| USBDFU/USBDFU.cpp | Show annotated file Show diff for this revision Revisions of this file |
| USBDFU/WebUSBDFU.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/USBDFU/USBDFU.cpp Sun Sep 04 03:13:09 2016 +0000
+++ b/USBDFU/USBDFU.cpp Fri Nov 25 18:26:37 2016 +0000
@@ -31,7 +31,7 @@
}
void USBDFU::attach(Callback<void()> func) {
- if (func != NULL) {
+ if (func) {
detach.attach(func);
} else {
detach.attach(no_op);
--- a/USBDFU/WebUSBDFU.cpp Sun Sep 04 03:13:09 2016 +0000
+++ b/USBDFU/WebUSBDFU.cpp Fri Nov 25 18:26:37 2016 +0000
@@ -36,7 +36,7 @@
}
void WebUSBDFU::attach(Callback<void()> func) {
- if (func != NULL) {
+ if (func) {
detach.attach(func);
} else {
detach.attach(no_op);
