From 6391a7995712a9c6ed54d2bfdee6057a721059b5 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Mon, 14 Mar 2011 19:03:42 +0000 Subject: [PATCH] * Correct case for long items (didn't matter as no long items are defined). * Move the main data declaration to where it's used. * Tiny cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40952 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/add-ons/kernel/drivers/input/usb_hid/HIDParser.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/add-ons/kernel/drivers/input/usb_hid/HIDParser.cpp b/src/add-ons/kernel/drivers/input/usb_hid/HIDParser.cpp index adfcc8c18b..465a9328de 100644 --- a/src/add-ons/kernel/drivers/input/usb_hid/HIDParser.cpp +++ b/src/add-ons/kernel/drivers/input/usb_hid/HIDParser.cpp @@ -103,7 +103,6 @@ HIDParser::ParseReportDescriptor(const uint8 *reportDescriptor, switch (item->type) { case ITEM_TYPE_MAIN: { - main_item_data *mainData = (main_item_data *)&data; if (item->tag == ITEM_TAG_MAIN_COLLECTION) { HIDCollection *newCollection = new(std::nothrow) HIDCollection(collection, @@ -173,7 +172,7 @@ HIDParser::ParseReportDescriptor(const uint8 *reportDescriptor, localState.usage_minimum.is_extended = localState.usage_maximum.is_extended = true; } - + localState.usage_stack = usageStack; localState.usage_stack_used = usageStackUsed; @@ -186,6 +185,7 @@ HIDParser::ParseReportDescriptor(const uint8 *reportDescriptor, if (!localState.string_index_set) localState.string_index = localState.string_minimum; + main_item_data *mainData = (main_item_data *)&data; target->AddMainItem(globalState, localState, *mainData, collection); } @@ -351,7 +351,7 @@ HIDParser::ParseReportDescriptor(const uint8 *reportDescriptor, break; } - case ITEM_TAG_LONG: + case ITEM_TYPE_LONG: { long_item *longItem = (long_item *)item;