cotire : Boolean variables are now unique in the project and not local to file they are defined in

This commit is contained in:
Magne Sjaastad 2016-06-08 12:13:49 +02:00
parent 7742fbe325
commit c046e52aff
2 changed files with 3 additions and 3 deletions

View File

@ -54,10 +54,10 @@
#define CAF_FACTORY_CONCATENATE_STRINGS(foo, bar) CAF_FACTORY_CONCATENATE_STRINGS_IMPL_(foo, bar)
#define CAF_FACTORY_CONCATENATE_STRINGS_IMPL_(foo, bar) foo ## bar
#define CAF_UNIQUE_COMPILE_UNIT_VAR_NAME CAF_FACTORY_CONCATENATE_STRINGS(caf_factory_init_, __LINE__)
#define CAF_UNIQUE_COMPILE_UNIT_VAR_NAME(foo) CAF_FACTORY_CONCATENATE_STRINGS(foo, __LINE__)
#define CAF_FACTORY_REGISTER(BaseType, TypeToCreate, KeyType, key) \
static bool CAF_UNIQUE_COMPILE_UNIT_VAR_NAME = caf::Factory<BaseType, KeyType>::instance()->registerCreator<TypeToCreate>(key)
static bool CAF_UNIQUE_COMPILE_UNIT_VAR_NAME(my##TypeToCreate) = caf::Factory<BaseType, KeyType>::instance()->registerCreator<TypeToCreate>(key)
namespace caf
{

View File

@ -36,7 +36,7 @@ public: \
bool ClassName::Error_You_forgot_to_add_the_macro_CAF_PDM_XML_HEADER_INIT_and_or_CAF_PDM_XML_SOURCE_INIT_to_your_cpp_file_for_this_class() { return false;} \
\
QString ClassName::classKeywordStatic() { return keyword; } \
static bool PDM_OBJECT_STRING_CONCATENATE(pdm_object_factory_init_, __LINE__) = caf::PdmDefaultObjectFactory::instance()->registerCreator<ClassName>()
static bool PDM_OBJECT_STRING_CONCATENATE(my##ClassName, __LINE__) = caf::PdmDefaultObjectFactory::instance()->registerCreator<ClassName>()
#define CAF_PDM_XML_ABSTRACT_SOURCE_INIT(ClassName, keyword) \
bool ClassName::Error_You_forgot_to_add_the_macro_CAF_PDM_XML_HEADER_INIT_and_or_CAF_PDM_XML_SOURCE_INIT_to_your_cpp_file_for_this_class() { return false;} \