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
Both callers of ReadIniArgs need the string removed afterward. Prior to
8fb9a0f, only the parser for `-ini` needed the string removed. The
caller for the automatic ini file ended and destroyed the container. As
of 8fb9a0f, the container persists. Leaving the string in the container
causes a bad error message if the command line is rejected.
It is bad form to have ReadIniArgs pop, but the caller push. However,
the two callers use different signatures for emplace_back(), so unifying
the push would require calling a suboptimal emplace_back. Choose the
lesser evil of unbalanced push/pop.
Reported-by: zicodxx <https://github.com/dxx-rebirth/dxx-rebirth/issues/198>
get_chunks_state has a member named `data` and its constructor took a
parameter named `data`. This is unambiguous in the language, but causes
a warning from gcc's -Wshadow when building with WORDS_NEED_ALIGNMENT.
Rename the parameter to eliminate the warning.
Reported-by: derhass <https://github.com/dxx-rebirth/dxx-rebirth/pull/196>
Descent for DOS supported paging content on demand. Rebirth has no
support for paging content out, but retained piggy_page_flushed
to track whether anything had been paged out. Commit 3c20c24 ("Disable
piggy_bitmap_page_out_all") removed the last site that could set
piggy_bitmap_page_out_all to a non-zero value. All remaining code
either tests it for non-zero or sets it to zero.
Remove the statements that set it to zero.
Remove assertions that the value is zero.
Remove conditional blocks that execute only when it is non-zero.