Skip to content

Replace include guards with '#pragma once'

Although #pragma once is not standard and compilers have a very efficient way to handle C-style include guards, it's common to end up with include guards that are not in sync with the file name (for example because of copy+paste or files being renamed).

Since #pragma once is supported by all major compilers (at least those that we support) it's safe to replace include guards with #pragma once and if we ever need to go back, it's trivial to replace all #pragma once occurrences with the equivalent include guards.

See #341

Merge request reports

Loading