Include guards vs pragma once
Posted: Sat Mar 22, 2014 5:53 pm
Just throwing this out there.
Noticed some discussion about using include guards vs pragma once in the UnrealEngine4 sourcecode, I hadn't given it much thought before but "pragma once" is supposed to be quicker and is supported by all of the compilers now.
Just checked and we're not using it at all on Pioneer.
Is it ok to update the coding standards and start using it as well or instead of include guards?
By include guards I means MACRO usage like:
Andy
Noticed some discussion about using include guards vs pragma once in the UnrealEngine4 sourcecode, I hadn't given it much thought before but "pragma once" is supposed to be quicker and is supported by all of the compilers now.
Just checked and we're not using it at all on Pioneer.
Is it ok to update the coding standards and start using it as well or instead of include guards?
By include guards I means MACRO usage like:
Code: Select all
#ifndef _MATERIAL_H
#define _MATERIAL_H
// code goes here
...
#endif