5% cpu optimization
This commit is contained in:
@@ -365,10 +365,6 @@ namespace ns3 {
|
||||
* The TypeId class
|
||||
*********************************************************************/
|
||||
|
||||
TypeId::TypeId ()
|
||||
: m_tid (0)
|
||||
{}
|
||||
|
||||
TypeId::TypeId (const char *name)
|
||||
{
|
||||
uint16_t uid = Singleton<IidManager>::Get ()->AllocateUid (name);
|
||||
@@ -380,8 +376,6 @@ TypeId::TypeId (const char *name)
|
||||
TypeId::TypeId (uint16_t tid)
|
||||
: m_tid (tid)
|
||||
{}
|
||||
TypeId::~TypeId ()
|
||||
{}
|
||||
TypeId
|
||||
TypeId::LookupByName (std::string name)
|
||||
{
|
||||
|
||||
@@ -351,8 +351,10 @@ public:
|
||||
void SetUid (uint16_t tid);
|
||||
|
||||
// construct an invalid TypeId.
|
||||
TypeId ();
|
||||
~TypeId ();
|
||||
inline TypeId ();
|
||||
inline TypeId (const TypeId &o);
|
||||
inline TypeId &operator = (const TypeId &o);
|
||||
inline ~TypeId ();
|
||||
|
||||
private:
|
||||
friend class AttributeList;
|
||||
@@ -393,6 +395,19 @@ ATTRIBUTE_HELPER_HEADER (TypeId);
|
||||
|
||||
namespace ns3 {
|
||||
|
||||
TypeId::TypeId ()
|
||||
: m_tid (0) {}
|
||||
TypeId::TypeId (const TypeId &o)
|
||||
: m_tid (o.m_tid) {}
|
||||
TypeId &TypeId::operator = (const TypeId &o)
|
||||
{
|
||||
m_tid = o.m_tid;
|
||||
return *this;
|
||||
}
|
||||
TypeId::~TypeId ()
|
||||
{}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
* The TypeId implementation which depends on templates
|
||||
*************************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user