fegennari / 3DWorld

3D Procedural Game Engine Using OpenGL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

reserved identifier violation

elfring opened this issue · comments

I would like to point out that identifiers like “_ASTEROID_H_” and “_BUILDING_H_do not fit to the expected naming convention of the C language standard.
Would you like to adjust your selection for unique names?

Thanks. I wasn't aware of the underscore naming convention rules. I've never run into a problem with this before. It's probably best to change all 66 headers to use "#pragma once" instead of these macro include guards to match the newer headers that already do it this way. That took a while but it's committed.

Interesting. I wasn't aware of that either. I have been using this in both Visual Studio and gcc for a while now without problems. I've had "#pragma once" in 3DWorld for about two years now in some of the newer header files. While it may not be standard compliant, I prefer to leave it in until I run into an actual problem. Also, because it's been in use in other files, I don't consider this change a regression. Maybe I'll get back to this later. Thank you.