diff options
Diffstat (limited to 'sql/sql_list.h')
-rw-r--r-- | sql/sql_list.h | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/sql/sql_list.h b/sql/sql_list.h index 311e601490b..0219c226803 100644 --- a/sql/sql_list.h +++ b/sql/sql_list.h @@ -138,6 +138,13 @@ public: first == rhs.first && last == rhs.last; } + base_list& operator=(const base_list &rhs) + { + elements= rhs.elements; + first= rhs.first; + last= elements ? rhs.last : &first; + return *this; + } inline void empty() { elements=0; first= &end_of_list; last=&first;} inline base_list() { empty(); } @@ -152,9 +159,7 @@ public: */ inline base_list(const base_list &tmp) :Sql_alloc() { - elements= tmp.elements; - first= tmp.first; - last= elements ? tmp.last : &first; + *this= tmp; } /** Construct a deep copy of the argument in memory root mem_root. @@ -164,7 +169,7 @@ public: */ bool copy(const base_list *rhs, MEM_ROOT *mem_root); base_list(const base_list &rhs, MEM_ROOT *mem_root) { copy(&rhs, mem_root); } - inline base_list(bool error) { } + inline base_list(bool) {} inline bool push_back(void *info) { if (((*last)=new list_node(info, &end_of_list))) @@ -533,10 +538,10 @@ public: template <class T> class List_iterator_fast :public base_list_iterator { protected: - inline T *replace(T *a) { return (T*) 0; } - inline T *replace(List<T> &a) { return (T*) 0; } - inline void remove(void) { } - inline void after(T *a) { } + inline T *replace(T *) { return (T*) 0; } + inline T *replace(List<T> &) { return (T*) 0; } + inline void remove(void) {} + inline void after(T *) {} inline T** ref(void) { return (T**) 0; } public: @@ -605,7 +610,7 @@ struct ilink { return (void*)my_malloc((uint)size, MYF(MY_WME | MY_FAE | ME_FATALERROR)); } - static void operator delete(void* ptr_arg, size_t size) + static void operator delete(void* ptr_arg, size_t) { my_free(ptr_arg); } |