-
- Downloads
Move #pragma once outside #ifdef's.
In this particular case it does no harm, but since in other cases it can lead to problems I didn't want to add an exception for this case to fix_headers.sh, that currently chokes on this because it doesn't know better than that it's a bad thing. Note on how #pragma once works: when encountered (aka the #ifdef that it is inside has to be true), the compiler marks the whole file as "seen" (this is implementation defined, but most implementations store the inode of the file). Subsequent #include's of that file/inode are then completely skipped. Hence it doesn't matter if the #pragma is at the beginning, at the end or in the middle, but it should be encountered every #include, usually, and thus not be inside an #if... #endif construct.
Loading
Please register or sign in to comment