Cranium icon indicating copy to clipboard operation
Cranium copied to clipboard

Cranium lacks proper prefixing

Open knome opened this issue 9 years ago • 0 comments

All functions, macros and datatypes defined by cranium should have a prefix associated with them to avoid having cranium and another library's defined functions conflict during compilation.

For example, you defined MAX in FUNCTION_H, which may conflict with a differently defined MAX from another projects headers. Instead CRANIUM_MAX(...) should be used. You may want to do this with your template guards as well ( CRANIUM_FUNCTION_H ) to avoid a situation where a user would find your header or another library's header mysteriously not being included because both check for and define the same macro definition in their template guards.

knome avatar Jan 09 '17 23:01 knome