diff options
author | Bardur Arantsson <bardur@scientician.net> | 2019-02-15 19:20:26 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2019-02-15 19:20:26 +0100 |
commit | 231f73171c21acf419d93cf0c505028bd5f223ca (patch) | |
tree | 6b987d168c3e6a99f4be3bdd9220c70fa5daef01 | |
parent | 60b073ceac6d41d5e4445207d57312c6704669ad (diff) |
Inline term_get_size()
-rw-r--r-- | src/z-term.cc | 23 | ||||
-rw-r--r-- | src/z-term.hpp | 1 |
2 files changed, 9 insertions, 15 deletions
diff --git a/src/z-term.cc b/src/z-term.cc index 80177436..ca658bb4 100644 --- a/src/z-term.cc +++ b/src/z-term.cc @@ -1487,7 +1487,15 @@ void Term_with_active(term *t, std::function<void ()> callback) */ void Term_get_size(int *w, int *h) { - term_get_size(Term, w, h); + if (w) + { + (*w) = Term->wid; + } + + if (h) + { + (*h) = Term->hgt; + } } @@ -1947,16 +1955,3 @@ void term_set_resize_hook(term *t, resize_hook_t *hook) { t->resize_hook = hook; } - -void term_get_size(term *t, int *w, int *h) -{ - if (w) - { - (*w) = t->wid; - } - - if (h) - { - (*h) = t->hgt; - } -} diff --git a/src/z-term.hpp b/src/z-term.hpp index b5d5c40b..83c903cc 100644 --- a/src/z-term.hpp +++ b/src/z-term.hpp @@ -167,4 +167,3 @@ void term_init_icky_corner(term *t); void term_init_soft_cursor(term *t); void term_init_ui_hooks(term *t, term_ui_hooks_t hooks); void term_set_resize_hook(term *t, resize_hook_t *hook); -void term_get_size(term *t, int *w, int *h); |