Make enum in sorting function const
This commit is contained in:
		@@ -162,10 +162,11 @@ static gint sort_func(GtkListBoxRow *row1, GtkListBoxRow *row2, gpointer unused)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	LayerElement *le1, *le2;
 | 
						LayerElement *le1, *le2;
 | 
				
			||||||
	gint ret;
 | 
						gint ret;
 | 
				
			||||||
	enum layer_selector_sort_algo default_sort = LAYER_SELECTOR_SORT_DOWN;
 | 
						static const enum layer_selector_sort_algo default_sort = LAYER_SELECTOR_SORT_DOWN;
 | 
				
			||||||
	enum layer_selector_sort_algo *algo = (enum layer_selector_sort_algo *)unused;
 | 
						const enum layer_selector_sort_algo *algo = (const enum layer_selector_sort_algo *)unused;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Assume downward sorting */
 | 
						/* Assume downward sorting */
 | 
				
			||||||
 | 
						/* TODO: This is nasty. Find a better way */
 | 
				
			||||||
	if (!algo)
 | 
						if (!algo)
 | 
				
			||||||
		algo = &default_sort;
 | 
							algo = &default_sort;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user