From d3a8e1dfef6b52ddfb6eb5d456e317ea3db2b32b Mon Sep 17 00:00:00 2001 From: Bert Hubert Date: Fri, 11 Nov 2005 11:24:21 +0000 Subject: [PATCH] qtype speedup - lack of a direct copy constructor caused heaps of string conversions git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@540 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- pdns/qtype.hh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pdns/qtype.hh b/pdns/qtype.hh index cacf3d6b6..bcf539cf1 100644 --- a/pdns/qtype.hh +++ b/pdns/qtype.hh @@ -48,10 +48,17 @@ public: QType(); //!< Naked constructor explicit QType(int); //!< convert from an integer to a QType QType(const char *p); //!< convert from a char* to a QType - + QType(const QType& orig) : code(orig.code) + { + } QType &operator=(int); //!< Assigns integers to us QType &operator=(const char *); //!< Assings strings to us QType &operator=(const string &); //!< Assings strings to us + QType &operator=(const QType&rhs) //!< Assings strings to us + { + code=rhs.code; + return *this; + } bool operator==(const QType &) const; //!< equality operator const string getName() const; //!< Get a string representation of this type -- 2.49.0