Misc: Modify function attributes
- Remove the const function attribute from get_time_*(), since the functions they call that actually get the time probably access global variables or have other behaviors unacceptable for const functions. - Change the const function attribute on win_has_frame() to pure, as it accesses memory its parameter points to, which is invalid for a const function.
This commit is contained in:
@ -500,7 +500,7 @@ update_reg_ignore_expire(session_t *ps, const win *w) {
|
||||
/**
|
||||
* Check whether a window has WM frames.
|
||||
*/
|
||||
static inline bool __attribute__((const))
|
||||
static inline bool __attribute__((pure))
|
||||
win_has_frame(const win *w) {
|
||||
return w->a.border_width
|
||||
|| w->frame_extents.top || w->frame_extents.left
|
||||
|
Reference in New Issue
Block a user