* Make some functions in win.c pure
* Remove unused code
* Fix misuse of attr_const, const functions shouldn't exam data pointed
  to by its pointer arguments.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-02-21 14:08:08 +00:00
parent 69826a0844
commit 350933a054
7 changed files with 71 additions and 82 deletions

View File

@@ -41,16 +41,6 @@ find_client_win(session_t *ps, xcb_window_t w);
win *find_toplevel2(session_t *ps, xcb_window_t wid);
/**
* Subtract two unsigned long values.
*
* Truncate to 0 if the result is negative.
*/
static inline unsigned long attr_const
sub_unslong(unsigned long a, unsigned long b) {
return (a > b) ? a - b : 0;
}
/**
* Set a <code>switch_t</code> array of all unset wintypes to true.
*/