summaryrefslogtreecommitdiff
path: root/sql/sql_list.h
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-10-12 12:14:13 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-10-12 12:14:13 +0300
commita992c615a66341ec4c86d0f97fcdb36e3b837a54 (patch)
treede1e5af122d35443a964c10d68c287022da084f6 /sql/sql_list.h
parent15edd69ddf649ebf7ecab3fa72bc5dea263c0154 (diff)
parent977c385df36dcb751720dc838521b7cb5a328cb9 (diff)
downloadmariadb-git-a992c615a66341ec4c86d0f97fcdb36e3b837a54.tar.gz
Merge 10.5 into 10.6
Diffstat (limited to 'sql/sql_list.h')
-rw-r--r--sql/sql_list.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/sql_list.h b/sql/sql_list.h
index 91134bcbeb2..9d159071ff3 100644
--- a/sql/sql_list.h
+++ b/sql/sql_list.h
@@ -119,8 +119,8 @@ struct list_node :public Sql_alloc
{
list_node *next;
void *info;
- list_node(void *info_par,list_node *next_par)
- :next(next_par),info(info_par)
+ list_node(const void *info_par, list_node *next_par)
+ :next(next_par), info(const_cast<void *>(info_par))
{}
list_node() /* For end_of_list */
{
@@ -385,7 +385,7 @@ public:
#endif // LIST_EXTRA_DEBUG
protected:
- void after(void *info,list_node *node)
+ void after(const void *info, list_node *node)
{
list_node *new_node=new list_node(info,node->next);
node->next=new_node;
@@ -446,11 +446,11 @@ public:
{
el= &list->first;
}
- inline void *replace(void *element)
+ inline void *replace(const void *element)
{ // Return old element
void *tmp=current->info;
DBUG_ASSERT(current->info != 0);
- current->info=element;
+ current->info= const_cast<void *>(element);
return tmp;
}
void *replace(base_list &new_list)
@@ -473,7 +473,7 @@ public:
el=prev;
current=0; // Safeguard
}
- void after(void *element) // Insert element after current
+ void after(const void *element) // Insert element after current
{
list->after(element,current);
current=current->next;