Commit graph

23 commits

Author SHA1 Message Date
Kp c802f27968 Switch physfsrwops.cpp integer casts to static_cast 2016-09-04 00:02:50 +00:00
Kp 75241fbbd7 Switch physfsrwops.opp pointer casts to reinterpret_cast 2016-09-04 00:02:50 +00:00
Kp b282bea173 Rewrite simple integer casts from C style to static_cast<>
This pass only targets commonly used standard types.

s/(\(\s*\(\(un\)\?signed\|int\|char\|short\|long\|float\|double\|s\?size_t\|\(u\?int[[:digit:]]\+_t\)\)\)\s*)\s*(/static_cast<\1>(/g
2016-06-05 01:04:26 +00:00
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
Kp 86709f547b Fix capitalization of PHYSFS_File
Per comment in physfs.h, the spelling PHYSFS_file is deprecated.
Replace all instances with PHYSFS_File.
2016-01-09 16:38:14 +00:00
Kp cfd08b5d6c Suppress physfsx read/write macros in physfsrwops.cpp 2015-07-25 23:10:48 +00:00
Kp d0de0cf963 Use unique_ptr for SDL_RWops 2015-02-08 17:43:29 +00:00
zico ad7cb106bc Changed custom D1X license to GPLv3 2014-06-01 19:55:23 +02:00
Kp 8b50798bf7 Move d2x-rebirth/misc/physfsrwops.c -> d2x-rebirth/misc/physfsrwops.cpp 2013-12-01 23:56:17 +00:00
Kp 1ed0a170a9 Remove unused PHYSFSRWOPS_openWrite 2013-12-01 23:56:17 +00:00
Kp 3c61dc4dec Remove unused PHYSFSRWOPS_openAppend 2013-12-01 23:56:17 +00:00
Kp 8413412426 Remove unused PHYSFSRWOPS_makeRWops 2013-12-01 23:56:17 +00:00
Kp 8d6698b4e6 Move */misc/args.c -> similar/misc/args.c 2013-03-03 01:03:33 +00:00
Kp 299b47656b Move */misc/hash.c -> similar/misc/hash.c 2013-03-17 23:01:31 +00:00
Kp 68fec5f94a Move */misc/physfsx.c -> similar/misc/physfsx.c 2013-03-17 23:01:31 +00:00
Kp 863bcff083 Move */misc/dl_list.c -> common/misc/dl_list.c 2013-03-03 01:03:33 +00:00
Kp 54affd79a9 Move */misc/error.c -> common/misc/error.c 2013-03-03 01:03:33 +00:00
Kp 630344aa98 Move */misc/hmp.c -> common/misc/hmp.c 2013-03-03 01:03:33 +00:00
Kp 451c3746a5 Move */misc/ignorecase.c -> common/misc/ignorecase.c 2013-03-03 01:03:33 +00:00
Kp c5279ea5e8 Move */misc/strio.c -> common/misc/strio.c 2013-03-03 01:03:33 +00:00
Kp 610459c520 Move */misc/strutil.c -> common/misc/strutil.c 2013-03-03 01:03:33 +00:00
Kp d7f46c9623 Merge branch 'd2x-rebirth' into unification/master 2013-03-10 03:37:28 +00:00
Kp 7cda97cc74 Move d2x-rebirth source into subdirectory d2x-rebirth 2013-02-19 00:34:46 +00:00