OpenNI2
OpenNI2 copied to clipboard
reserved identifier violation
I would like to point out that identifiers like "_OPENNI_H_
" and "_ONI_C_API_H_
" do not fit to the expected naming convention of the C language standard.
Would you like to adjust your selection for unique names?
Fixed in 69dff6ef5913767e9f4f5c5dbaecc0c5cf6aa113. Thanks!
Thanks for your source code improvement.
This update seems to be incomplete so far.
- I find a name like "VIEWER_H" too short here. How do you think about to make your include guards not only standard-compliant but also really unique by appending a kind of UUID?
- Would you also like to improve identifiers like "
_OniFrameSync
" and "_BM_REQUEST_TYPE
"?
- Viewer.h is an internal include file, not to be used from another project, so I don't think it's really an issue.
- UUID are a bit too much IMO.
- usb200.h (which contains _BM_REQUEST_TYPE) is a file taken from Windows DDK (despite what it says in its header), I prefer not to change it.
- Regarding "hidden" struct names (like _OniFrameSync) - you're right. I'll fix that as well.
#pragma once
is supported by every major compiler and is in several ways superior to #include
guards.