dxx-rebirth/common
Kp 1b12a3f7ef Add parentheses around target of more complicated casts
C casts do not require parentheses.  C++ casts require grouping around
the target.  Prepare for conversion to C++ casts by adding otherwise
unnecessary parentheses around the target of some C casts.

This pass attempts to process expressions that involve parenthesized or
bracketed subexpressions, but only if those subexpressions do not
themselves contain parenthesized or bracketed subexpressions.

	(int) f(1);	// changed
	(int) f(g());	// not changed

perl -p -i -e 's/(\(\s*((?:un)?signed|int|char|short|long|float|double|s?size_t|(?:u?int[[:digit:]]+_t))\s*\**\s*\)\s*)([&+-]?)([[:alnum:]_.]+\s*->\s*)*([[:alnum:]_.]+)((?:\s*(?:\[[^][]*\])*|(?:\([^()]*\))*))(\s*([;+>*\/^%,|&<>])|$|(\s*-\s*[^>]))/\1\(\3\4\5\6\)\7/g'
2016-06-12 03:45:37 +00:00
..
2d Add parentheses around target of more complicated casts 2016-06-12 03:45:37 +00:00
3d Pass color to g3_draw_sphere 2016-02-12 04:02:28 +00:00
arch Added breaks in event.cpp to prevent unwanted events if -nomouse and/or -nojoystick is given; Added automap_apply_input() to prevent multiple inputs per frame causing multiple movement applications. 2016-05-30 13:17:42 +02:00
editor Remove unnecessary gr_setcolor calls 2016-02-12 04:02:28 +00:00
include Pass bm_mode to gr_init_bitmap 2016-05-28 17:31:27 +00:00
main Added packet to notify clients about a changed vulcan ammo count in a weapon powerup in case player collects ammo but leaves the gun itself. 2016-06-06 17:26:59 +02:00
maths Rewrite simple integer casts from C style to static_cast<> 2016-06-05 01:04:26 +00:00
mem Add parentheses around target of more complicated casts 2016-06-12 03:45:37 +00:00
misc Rewrite simple pointer casts from C style to reinterpret_cast<> 2016-06-05 01:04:26 +00:00
texmap Add parentheses around target of more complicated casts 2016-06-12 03:45:37 +00:00
ui Add parentheses around target of more complicated casts 2016-06-12 03:45:37 +00:00