From dd7996b57d99125eb2676cc3c3ee7c8a85d56a2a Mon Sep 17 00:00:00 2001 From: "Peter D. Barnes, Jr." Date: Wed, 8 Oct 2014 21:04:32 -0700 Subject: [PATCH] Set default TypeId size. --- src/core/model/type-id.cc | 1 + src/core/model/type-id.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/core/model/type-id.cc b/src/core/model/type-id.cc index 9038077b7..d865cca44 100644 --- a/src/core/model/type-id.cc +++ b/src/core/model/type-id.cc @@ -215,6 +215,7 @@ IidManager::AllocateUid (std::string name) information.hash = hash; information.parent = 0; information.groupName = ""; + information.size = (std::size_t)(-1); information.hasConstructor = false; information.mustHideFromDocumentation = false; m_information.push_back (information); diff --git a/src/core/model/type-id.h b/src/core/model/type-id.h index eb1da98c9..d48699290 100644 --- a/src/core/model/type-id.h +++ b/src/core/model/type-id.h @@ -252,6 +252,9 @@ public: * \code * SetSize (sizeof ()); * \endcode + * This is done automatically by NS_LOG_ENSURE_REGISTERED() + * A ridiculously large reported size is a symptom that the + * type hasn't been registered. * * \param size The size of the object, in bytes. * \returns this TypeId instance.