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:
Richard Grenville
2015-09-06 22:32:52 +08:00
parent c156abb0e8
commit 20e996494b
2 changed files with 3 additions and 3 deletions

View File

@ -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