mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Remove magic macro's. They are only used in one place, so no point.
This commit is contained in:
parent
f93e4d1f42
commit
479123fcef
1 changed files with 9 additions and 11 deletions
|
@ -250,9 +250,6 @@ typedef struct
|
|||
winlist *cache_client = NULL;
|
||||
winlist *cache_xattr = NULL;
|
||||
|
||||
#define winlist_ascend( l, i, w ) for ( ( i ) = 0; ( i ) < ( l )->len && ( ( ( w ) = ( l )->array[i] ) || 1 ); ( i )++ )
|
||||
#define winlist_descend( l, i, w ) for ( ( i ) = ( l )->len - 1; ( i ) >= 0 && ( ( ( w ) = ( l )->array[i] ) || 1 ); ( i )-- )
|
||||
|
||||
#define WINLIST 32
|
||||
|
||||
winlist* winlist_new ()
|
||||
|
@ -299,9 +296,11 @@ int winlist_find ( winlist *l, Window w )
|
|||
int i;
|
||||
Window o = 0;
|
||||
|
||||
winlist_descend ( l, i, o ) if ( w == o ) {
|
||||
for ( i = ( l->len - 1 ); i >= 0; i-- ) {
|
||||
if ( l->array[i] == w ) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
@ -1855,9 +1854,8 @@ SwitcherMode run_switcher_window ( char **input, G_GNUC_UNUSED void *data )
|
|||
unsigned int lines = 0;
|
||||
|
||||
// build the actual list
|
||||
Window w = 0;
|
||||
winlist_ascend ( ids, i, w )
|
||||
{
|
||||
for ( i = 0; i < ( ids->len ); i++ ) {
|
||||
Window w = ids->array[i];
|
||||
client *c;
|
||||
|
||||
if ( ( c = window_client ( w ) ) ) {
|
||||
|
|
Loading…
Reference in a new issue