Kp
6285878c4c
Add color_palette_index type alias, to note palette-related uint8_t
2020-07-16 02:31:04 +00:00
Kp
db7b4b3f88
Refer to <memory> directly, not through "compiler-make_unique.h"
2020-05-02 21:18:43 +00:00
Kp
cc38cdf4b8
Qualify uses of std::make_unique
2020-05-02 21:18:42 +00:00
Kp
8839f538e0
Refer to <array> directly, not through "compiler-array.h"
2020-05-02 21:18:42 +00:00
Kp
53761500f1
Qualify uses of std::array
2020-05-02 21:18:42 +00:00
Kp
9cee93abb1
Require support for C++14 std::exchange
2020-05-02 21:18:42 +00:00
Kp
2243cd7f58
Use xrange for loops with zero start and constant numerical end
...
s/for\s*(\s*\(\w\+\)\s\+\(\w\+\)\s*=\s*0\+u\?\s*;\s*\2\s*\(!=\|<\)\s*\([0-9]\+\)u\?\s*;\s*\(++\s*\2\|\2\s*++\s*\))/range_for (const \1 \2, xrange(\4u))/
2019-05-04 18:27:36 +00:00
Kp
063bf29225
Enable -Wimplicit-fallthrough=5; fix resulting breaks
...
This enables using -Wimplicit-fallthrough with ccache+distcc, which
strip the fallthrough comments, but do not strip the attribute
annotationns.
2019-04-04 04:29:03 +00:00
Kp
ec1cf005b6
Enable -Wformat-truncation
...
Add macro cf_assert ("control flow" assert) to hint to gcc that certain
conditions are impossible. Use it to avoid generating range checks for
situations that never happen. If the event did happen, the only
consequence would be truncated UI text, rather than a correctness
problem.
2018-08-26 18:10:36 +00:00
Kp
08446f0ab6
Pass font to gr_string,gr_printf
2018-05-19 23:21:42 +00:00
Kp
e63bbe8c52
Set d_event type at construction
2018-05-12 18:24:19 +00:00
Kp
d049f738c8
Convert various gr_set_current_canvas calls to reference form
2017-11-05 20:49:08 +00:00
Kp
49c0cdae2e
Simplify calls to gr_set_default_canvas
...
Rather than use an inline wrapper and rely on the compiler optimizer to
redirect gr_set_current_canvas(nullptr) to gr_set_default_canvas,
rewrite all relevant calls directly in the source.
git grep -l 'gr_set_current_canvas' | xargs sed -i -e 's:gr_set_current_canvas(\s*NULL\|nullptr\s*);:gr_set_default_canvas();:'
2017-11-05 20:49:08 +00:00
Kp
4cfd5f3324
Pass canvas to menubar_init
2017-09-26 04:15:50 +00:00
Kp
adcf02e454
Expand tt:: indirection to std::
...
All supported compilers have an acceptable <type_traits>. Commit
4cb3d46148
("Move <type_traits> test to Cxx11RequiredFeature") made
<type_traits> support mandatory in August and no one has objected.
Remove the indirection and use namespace std directly for type_traits
members.
2017-06-25 20:46:03 +00:00
Kp
b0cb681ae7
Add gcc-7 /*-fallthrough*/ comments for obvious cases
...
For switch cases where existing comments or code flow logic obviously
intended to fall through, add a gcc-7 /*-fallthrough*/ comment to
silence warnings about this. Some cases which are less obvious are not
converted, so the code does not yet compile clean with
-Wimplicit-fallthrough.
Reported-by: parkerlreed <https://github.com/dxx-rebirth/dxx-rebirth/issues/338 >
2017-06-07 02:44:54 +00:00
Kp
c725a6cb88
Pass canvas to gr_init_font
2017-03-11 19:56:22 +00:00
Kp
c50756c958
Cache canvas in radio.cpp
2017-03-10 01:22:25 +00:00
Kp
5be6b53d16
Fold calls in ui_draw_radio
2017-03-10 01:22:25 +00:00
Kp
0f93dc6e34
Cache canvas in message.cpp
2017-03-10 01:22:25 +00:00
Kp
4d9541d776
Cache canvas in menubar.cpp
2017-03-10 01:22:25 +00:00
Kp
a730f68e0b
Cache canvas in listbox.cpp
2017-03-10 01:22:25 +00:00
Kp
6ff14b7688
Cache canvas in keypad.cpp
2017-03-10 01:22:25 +00:00
Kp
dff67dad1b
Cache canvas in inputbox.cpp
2017-03-10 01:22:24 +00:00
Kp
8d5ca033e1
Cache canvas in icon.cpp
2017-03-10 01:22:24 +00:00
Kp
9d4e1e307c
Shorten ui_dialog_do_gadgets
2017-03-10 01:22:24 +00:00
Kp
0dc59ab3f2
Simplify ui_dialog_handler switch
2017-03-10 01:22:24 +00:00
Kp
97cf921b72
Cache canvas in ui_draw_checkbox
2017-02-11 21:42:46 +00:00
Kp
2725ea02c2
Cache canvas in ui_draw_button
2017-02-11 21:42:46 +00:00
Kp
69a4857ba5
Pass canvas to ui_draw_box_in1
2017-02-11 21:42:44 +00:00
Kp
d4aa43c17e
Cache canvas in ui_draw_scrollbar
2017-02-11 21:42:37 +00:00
Kp
7a6818eb01
Fold ui_draw_checkbox calls
2017-02-11 21:42:36 +00:00
Kp
842bd7a649
Pass canvas to ui_string_centered
2017-02-11 21:42:36 +00:00
Kp
aa9b9a8346
Pass canvas to ui_draw_box_in
2017-02-11 21:42:36 +00:00
Kp
04c7f7c790
Pass canvas to ui_draw_box_out
2017-02-11 21:42:35 +00:00
Kp
a51b071053
Pass canvas to ui_draw_frame
2017-02-11 21:42:35 +00:00
Kp
5636a85f3c
Pass canvas to ui_draw_shad
2017-02-11 21:42:35 +00:00
Kp
cf1f5df3cc
Pass canvas to Vline
2017-02-11 21:42:35 +00:00
Kp
f9cb598b0f
Pass canvas to Hline
2017-02-11 21:42:35 +00:00
Kp
13320c8011
Fold ui_draw_button calls to gr_rect
2017-02-11 21:42:34 +00:00
Kp
e765f8b744
Reorder ui_draw_button to support folding
2017-02-11 21:42:34 +00:00
Kp
f28a5e77f1
Fold ui_draw_button calls to gr_set_fontcolor
2017-02-11 21:42:34 +00:00
Kp
554daa61cc
Pass font to ui_get_button_size
2017-02-11 21:42:34 +00:00
Kp
ae33aaafc1
Pass canvas to gr_set_fontcolor
2017-02-11 21:42:32 +00:00
Kp
c16b7763e9
Remove unused ui_draw_line_in
2017-02-08 23:34:41 +00:00
Kp
5da784dbed
Pass canvas to gr_{,u}string
2017-01-08 22:32:00 +00:00
Kp
1ef6b9d5bc
Pass font to gr_get_string_size
2017-01-08 22:31:59 +00:00
Kp
0480ba8030
Pass canvas to gr_string(int,int,const char*,int,int)
2017-01-08 22:31:59 +00:00
Kp
0905aefa0a
Pass canvas to gr_rect
2017-01-01 00:45:45 +00:00
Kp
794dcce327
Pass canvas to gr_urect
2017-01-01 00:45:44 +00:00