diff --git a/libs/yasn/asn.cpp b/libs/yasn/asn.cpp index 50b803c6..6d76e3bc 100644 --- a/libs/yasn/asn.cpp +++ b/libs/yasn/asn.cpp @@ -1334,18 +1334,6 @@ ASNObjId::~ASNObjId() m_ids.clear(); } -ASNObjId& ASNObjId::operator=(const String& val) -{ - m_value = val; - return *this; -} - -ASNObjId& ASNObjId::operator=(const char* val) -{ - m_value.assign(val); - return *this; -} - void ASNObjId::toDataBlock() { DDebug(s_libName.c_str(),DebugAll,"ASNObjId::toDataBlock() '%s'", m_value.c_str()); diff --git a/libs/yasn/yateasn.h b/libs/yasn/yateasn.h index 6841b73e..622f6756 100644 --- a/libs/yasn/yateasn.h +++ b/libs/yasn/yateasn.h @@ -114,13 +114,14 @@ public: */ inline AsnObject() {} + /** - * Constructor - * @param data Data from which the object is built - * @param len Length of the given data + * Copy constructor + * @param original Value object to copy */ - AsnObject(void* data, int len) + inline AsnObject(const AsnObject& original) {} + /** * Destructor */ @@ -181,6 +182,14 @@ public: : m_type(0), m_data("") {} + /** + * Copy constructor + * @param original Value object to copy + */ + inline AsnValue(const AsnValue& original) + : m_type(original.m_type), m_data(original.m_data) + { } + /** * Constructor * @param value Object value @@ -381,7 +390,7 @@ private: int maxVal; int minVal; unsigned int m_index; - + static TokenDict s_access[]; }; @@ -396,6 +405,14 @@ public: */ ASNObjId(); + /** + * Copy constructor + * @param original OID object to copy + */ + inline ASNObjId(const ASNObjId& original) + : m_value(original.m_value), m_name(original.m_name) + { } + /** * Constructor * @param val OID value in string format @@ -420,15 +437,23 @@ public: */ ~ASNObjId(); + /** + * Assignment operator from OID + */ + inline ASNObjId& operator=(const ASNObjId& original) + { m_value = original.toString(); return *this; } + /** * Assign operator from a string value */ - ASNObjId& operator=(const String& val); + inline ASNObjId& operator=(const String& val) + { m_value = val; return *this; } /** * Assign operator from a const char* value */ - ASNObjId& operator=(const char* val); + inline ASNObjId& operator=(const char* val) + { m_value = val; return *this; } /** * Transform the value of this OID from a string value to a sequence of numbers diff --git a/modules/server/zapcard.cpp b/modules/server/zapcard.cpp index f47b2f2a..39151ab5 100644 --- a/modules/server/zapcard.cpp +++ b/modules/server/zapcard.cpp @@ -579,8 +579,6 @@ public: const NamedList& params); virtual ~ZapCircuit() { cleanup(false); } - inline const ZapDevice device() const - { return m_device; } virtual void destroyed() { cleanup(true); } // Change circuit status. Clear events on status change diff --git a/yateclass.h b/yateclass.h index 743d764f..3964f6cd 100644 --- a/yateclass.h +++ b/yateclass.h @@ -794,7 +794,13 @@ void operator=(const type&) */ class YATE_API GenObject { + YNOCOPY(GenObject); // no automatic copies please public: + /** + * Default constructor + */ + inline GenObject() { } + /** * Destructor. */