From 9eed52026bae1b79af773e15910009973695e18e Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Wed, 20 Jan 2016 14:59:16 +0100 Subject: [PATCH] There is no reason to cast implicit to HIDReportParser, as the classes already inherits it --- examples/Bluetooth/BTHID/BTHID.ino | 4 ++-- examples/HID/USBHIDBootKbd/USBHIDBootKbd.ino | 2 +- .../HID/USBHIDBootKbdAndMouse/USBHIDBootKbdAndMouse.ino | 8 ++++---- examples/HID/USBHIDBootMouse/USBHIDBootMouse.ino | 2 +- examples/adk/adk_barcode/adk_barcode.ino | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/Bluetooth/BTHID/BTHID.ino b/examples/Bluetooth/BTHID/BTHID.ino index d0504012..33ee96c5 100644 --- a/examples/Bluetooth/BTHID/BTHID.ino +++ b/examples/Bluetooth/BTHID/BTHID.ino @@ -40,8 +40,8 @@ void setup() { while (1); // Halt } - bthid.SetReportParser(KEYBOARD_PARSER_ID, (HIDReportParser*)&keyboardPrs); - bthid.SetReportParser(MOUSE_PARSER_ID, (HIDReportParser*)&mousePrs); + bthid.SetReportParser(KEYBOARD_PARSER_ID, &keyboardPrs); + bthid.SetReportParser(MOUSE_PARSER_ID, &mousePrs); // If "Boot Protocol Mode" does not work, then try "Report Protocol Mode" // If that does not work either, then uncomment PRINTREPORT in BTHID.cpp to see the raw report diff --git a/examples/HID/USBHIDBootKbd/USBHIDBootKbd.ino b/examples/HID/USBHIDBootKbd/USBHIDBootKbd.ino index 9667bfbc..d7f7d60d 100644 --- a/examples/HID/USBHIDBootKbd/USBHIDBootKbd.ino +++ b/examples/HID/USBHIDBootKbd/USBHIDBootKbd.ino @@ -119,7 +119,7 @@ void setup() next_time = millis() + 5000; - HidKeyboard.SetReportParser(0, (HIDReportParser*)&Prs); + HidKeyboard.SetReportParser(0, &Prs); } void loop() diff --git a/examples/HID/USBHIDBootKbdAndMouse/USBHIDBootKbdAndMouse.ino b/examples/HID/USBHIDBootKbdAndMouse/USBHIDBootKbdAndMouse.ino index a4ffe25c..95963444 100644 --- a/examples/HID/USBHIDBootKbdAndMouse/USBHIDBootKbdAndMouse.ino +++ b/examples/HID/USBHIDBootKbdAndMouse/USBHIDBootKbdAndMouse.ino @@ -165,10 +165,10 @@ void setup() //next_time = millis() + 5000; - HidComposite.SetReportParser(0, (HIDReportParser*)&KbdPrs); - HidComposite.SetReportParser(1, (HIDReportParser*)&MousePrs); - HidKeyboard.SetReportParser(0, (HIDReportParser*)&KbdPrs); - HidMouse.SetReportParser(0, (HIDReportParser*)&MousePrs); + HidComposite.SetReportParser(0, &KbdPrs); + HidComposite.SetReportParser(1, &MousePrs); + HidKeyboard.SetReportParser(0, &KbdPrs); + HidMouse.SetReportParser(0, &MousePrs); } void loop() diff --git a/examples/HID/USBHIDBootMouse/USBHIDBootMouse.ino b/examples/HID/USBHIDBootMouse/USBHIDBootMouse.ino index 03389959..9816bcb5 100644 --- a/examples/HID/USBHIDBootMouse/USBHIDBootMouse.ino +++ b/examples/HID/USBHIDBootMouse/USBHIDBootMouse.ino @@ -73,7 +73,7 @@ void setup() next_time = millis() + 5000; - HidMouse.SetReportParser(0,(HIDReportParser*)&Prs); + HidMouse.SetReportParser(0, &Prs); } void loop() diff --git a/examples/adk/adk_barcode/adk_barcode.ino b/examples/adk/adk_barcode/adk_barcode.ino index b498ef93..e671c661 100644 --- a/examples/adk/adk_barcode/adk_barcode.ino +++ b/examples/adk/adk_barcode/adk_barcode.ino @@ -80,7 +80,7 @@ void setup() while(1); //halt }//if (Usb.Init() == -1... - HidKeyboard.SetReportParser(0, (HIDReportParser*)&Prs); + HidKeyboard.SetReportParser(0, &Prs); delay( 200 ); }