cleanup: const in List::push_front()

This commit is contained in:
Sergei Golubchik 2024-06-15 23:11:11 +02:00
parent 44ff2f7831
commit 570daecf49

View file

@ -212,9 +212,9 @@ public:
}
return 1;
}
inline bool push_front(void *info)
inline bool push_front(const void *info)
{ return push_front_impl(new list_node(info, first)); }
inline bool push_front(void *info, MEM_ROOT *mem_root)
inline bool push_front(const void *info, MEM_ROOT *mem_root)
{ return push_front_impl(new (mem_root) list_node(info,first)); }
void remove(list_node **prev)
{
@ -503,8 +503,8 @@ public:
inline bool push_back(T *a) { return base_list::push_back(a); }
inline bool push_back(T *a, MEM_ROOT *mem_root)
{ return base_list::push_back((void*) a, mem_root); }
inline bool push_front(T *a) { return base_list::push_front(a); }
inline bool push_front(T *a, MEM_ROOT *mem_root)
inline bool push_front(const T *a) { return base_list::push_front(a); }
inline bool push_front(const T *a, MEM_ROOT *mem_root)
{ return base_list::push_front((void*) a, mem_root); }
inline T* head() {return (T*) base_list::head(); }
inline T** head_ref() {return (T**) base_list::head_ref(); }