dxx-rebirth/similar/editor
Kp 7fdce88558 Add parentheses around target of simple 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 simple C casts.

This pass does not attempt to process expressions that involve
any subexpression that can nest arbitrarily, such as parentheses or
brackets.  It also works only on commonly used standard types.

	(int) a->b;	// changed
	(int) a[b];	// not changed

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*[^>]\)\)/\1(\5\6\7)\8/g
2016-06-05 01:04:25 +00:00
..
centers.cpp Fix -Wshadow warnings in centers_dialog_handler 2016-05-21 17:24:51 +00:00
curves.cpp Remove unnecessary gr_setcolor calls 2016-02-12 04:02:28 +00:00
eglobal.cpp Use segptridx for Cursegp, Markedsegp 2015-07-12 01:04:18 +00:00
elight.cpp Remove highest_valid 2016-02-12 04:02:28 +00:00
eobject.cpp Pass object &to init_ai_object 2016-04-23 17:59:47 +00:00
eswitch.cpp Use vwallptr 2016-02-12 04:02:28 +00:00
group.cpp Fix -Wshadow warnings in med_rotate_group 2016-05-22 17:49:31 +00:00
info.cpp Move array_size into valptridx_specialized_types 2015-11-26 02:56:55 +00:00
kbuild.cpp Remove highest_valid 2016-02-12 04:02:28 +00:00
kcurve.cpp Use segptridx for Cursegp, Markedsegp 2015-07-12 01:04:18 +00:00
kfuncs.cpp Move namespace dsx handling to dsx-ns.h 2016-03-19 19:08:10 +00:00
kgame.cpp Remove sprintf from editor/kgame.cpp 2016-01-09 16:38:16 +00:00
khelp.cpp Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
kmine.cpp Remove sprintf from editor/kmine.cpp 2016-01-09 16:38:16 +00:00
ksegmove.cpp Pass rotate_segment_new arg by & 2014-11-04 01:23:01 +00:00
ksegsel.cpp Use absolute_sibling to reduce global references for ptridx 2015-12-22 04:18:51 +00:00
ksegsize.cpp Remove highest_valid 2016-02-12 04:02:28 +00:00
ktmap.cpp Use absolute_sibling to reduce global references for ptridx 2015-12-22 04:18:51 +00:00
kview.cpp Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
med.cpp Add parentheses around target of simple casts 2016-06-05 01:04:25 +00:00
meddraw.cpp Fix -Wshadow warnings in draw_segment 2016-05-21 17:24:51 +00:00
medmisc.cpp Add parentheses around target of simple casts 2016-06-05 01:04:25 +00:00
medrobot.cpp Pass object &to init_ai_object 2016-04-23 17:59:47 +00:00
medsel.cpp Remove default argument for basic_ptr(pointer,array &) 2016-01-09 16:38:13 +00:00
medwall.cpp Use vwallptr 2016-02-12 04:02:28 +00:00
mine.cpp Add parentheses around target of simple casts 2016-06-05 01:04:25 +00:00
objpage.cpp Add fwd-event.h with forward declarations of event.h 2015-10-09 02:46:10 +00:00
segment.cpp Fix -Wshadow warnings in med_create_segment 2016-05-22 17:49:30 +00:00
seguvs.cpp Add parentheses around target of simple casts 2016-06-05 01:04:25 +00:00
texpage.cpp Remove highest_valid 2016-02-12 04:02:28 +00:00
texture.cpp Simplify fix_sincos calls 2015-06-02 03:03:31 +00:00