Set default TypeId size.
authorPeter D. Barnes, Jr. <barnes26@llnl.gov>
Wed, 08 Oct 2014 21:04:32 -0700
changeset 11004 6402c3eb3da6
parent 11003 30d3254bd18a
child 11005 c434fd45b4a9
Set default TypeId size.
src/core/model/type-id.cc
src/core/model/type-id.h
--- a/src/core/model/type-id.cc	Wed Oct 08 20:59:31 2014 -0700
+++ b/src/core/model/type-id.cc	Wed Oct 08 21:04:32 2014 -0700
@@ -215,6 +215,7 @@
   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);
--- a/src/core/model/type-id.h	Wed Oct 08 20:59:31 2014 -0700
+++ b/src/core/model/type-id.h	Wed Oct 08 21:04:32 2014 -0700
@@ -252,6 +252,9 @@
    * \code
    *   SetSize (sizeof (<typename>));
    * \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.