Skip to content

UDEFX2: Replace hardcoded USB descriptor sizes with sizeof(..) - #43

Open
forderud wants to merge 1 commit into
xxandy:masterfrom
forderud:usb-desc-size
Open

UDEFX2: Replace hardcoded USB descriptor sizes with sizeof(..)#43
forderud wants to merge 1 commit into
xxandy:masterfrom
forderud:usb-desc-size

Conversation

@forderud

@forderud forderud commented Apr 5, 2024

Copy link
Copy Markdown
Contributor

Done to reduce the a amount of "magic" values in the implementation, and make the code easier to follow. Also, remove g_UsbDeviceDescriptor from header, since it's not references in any other source file.

Visual evidence that it's safe to replace 0x9, 0x9 and 0x7 with sizeof(..): (Visual Studio tooltips):
image
image
image

Done to reduce the a amount of "magic" values in the implementation, and make the code easier to follow.

Also, remove g_UsbDeviceDescriptor from header, since it's not references in any other source file.
@forderud

forderud commented Jun 6, 2024

Copy link
Copy Markdown
Contributor Author

@xxandy Would it be possible for you to consider this PR?

1 similar comment
@forderud

forderud commented Aug 2, 2024

Copy link
Copy Markdown
Contributor Author

@xxandy Would it be possible for you to consider this PR?

@forderud

Copy link
Copy Markdown
Contributor Author

Gentle reminder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant