Kp
b35a893d9a
Rewrite simple pointer casts from C style to reinterpret_cast<>
...
s/(\s*\(\w\+\s*\*\+\)\s*)\s*(/reinterpret_cast<\1>(/g
2016-07-03 00:54:15 +00:00
Kp
19f31eb420
Rewrite simple pointer casts from C style to reinterpret_cast<>
...
This pass only targets int8_t and uint8_t.
s/(\s*\(u\?int8_t\s*\*\+\)\s*)\s*(/reinterpret_cast<\1>(/g
2016-07-03 00:54:14 +00:00
Kp
a7ceee3c03
Add parentheses around target of simple unsigned char
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.
s/(\s*unsigned\s\+char\s*\(\*\+\)\s*)\s*\([&+-]\?\)\([[:alnum:]_.]\+\s*->\s*\)*\([[:alnum:]_.]\+\)\(\s*\([];+>)*\/^%,|&<>]\)\|$\|\(\s*-\s*[^>]\)\)/(uint8_t \1)(\2\3\4)\5/g
2016-07-03 00:54:14 +00:00
Kp
c7953a3df1
Fix Win32 use of static_cast where reinterpret_cast is needed
2016-07-02 02:04:11 +00:00
Kp
231223895d
Rewrite simple pointer casts from C style to reinterpret_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*)\s*(/reinterpret_cast<\1>(/g
2016-06-05 01:04:26 +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
73b7905125
Fix -Wshadow warning in get_event (Windows only)
...
Reported-by: Mako88 <https://github.com/dxx-rebirth/dxx-rebirth/issues/200 >
2016-06-01 01:52:45 +00:00
Kp
27cef20eb3
Move namespace dsx handling to dsx-ns.h
2016-03-19 19:08:10 +00:00
Kp
1a4290002e
Revert partial_const_range for HMP get_event
...
Fixes: b57f08c798
("Use partial_const_range")
2016-02-17 03:34:30 +00:00
Kp
b57f08c798
Use partial_const_range
2016-02-12 04:02:28 +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
dc8c0323d8
Uninline namespace dcx
2015-12-13 18:00:49 +00:00
Kp
5b9e50a815
Use inline namespace dcx for common/misc
2015-12-05 22:57:24 +00:00
Kp
dad504cfef
Fix some -Wshadow warnings
2015-11-26 02:56:54 +00:00
Kp
3ceefb4189
Pass filename to Error
2015-10-11 22:21:00 +00:00
Kp
1d99084026
Use UserError when main hog is missing
...
Error traps to the debugger and then aborts, which is not appropriate
for a user setup error.
2015-10-09 02:46:11 +00:00
Kp
a58e8f87a0
Move similar/misc/hash.cpp -> common/misc/hash.cpp
2015-07-18 21:01:56 +00:00
Kp
968cdbecf4
Add non-aborting UserError for user-caused fatal errors
2015-06-16 03:15:40 +00:00
Kp
ce72014e2e
Always parse WORDS_BIGENDIAN and !WORDS_BIGENDIAN
2015-06-13 22:42:21 +00:00
Kp
64ee9e0047
Improve memdebug d_strdup trace
2015-06-11 03:06:58 +00:00
Kp
fc4b686d9d
Store PHYSFS_list element count in list when needed
2015-05-09 17:38:57 +00:00
Kp
6792c1bc4b
Enable -Wunused-parameter
2015-04-26 20:15:56 +00:00
Kp
c3925353fd
Use null_sentinel_iterator for PHYSFS_list_t
2015-04-26 20:15:51 +00:00
Kp
84c638ed64
Move PHYSFS_list_t to separate header
2015-04-19 04:18:49 +00:00
Kp
150e2d2686
Convert local arrays to array<>
2015-04-19 04:18:49 +00:00
Kp
3e520afc89
Reduce size of hmp_open buffer
2015-04-19 04:18:49 +00:00
Kp
66a70fd373
Prepare for global arrays to be array<>
2015-04-02 02:36:52 +00:00
Kp
08f6ad4bc7
Enable nested INI files
2015-03-22 18:49:21 +00:00
Kp
ae0a00a893
Return timer_query() from timer_update()
...
Most timer_update sites immediately query the timer, so return it to
save them the call.
2015-02-05 03:03:48 +00:00
Kp
18a64e4281
Use RAII for PHYSFS_enumerateFiles result
2015-01-23 03:55:05 +00:00
Kp
705777db05
Reduce searches in locateOneElement
2015-01-23 03:55:05 +00:00
Kp
b3050a8aa1
Fix adding string to empty string_array_t
2015-01-17 18:31:42 +00:00
Kp
f7815810e8
Use RAIIPHYSFS_File to manage PHYSFS_File
...
Fixes a few leaks on error paths.
2015-01-17 18:31:42 +00:00
Kp
484a2a705d
Use strcasecmp when available
2015-01-12 00:26:03 +00:00
Kp
205b533c67
Fix d_strnicmp with zero length input
2015-01-11 05:08:30 +00:00
Kp
2b2da39d84
Fix unique invocation in string_array_t tidy
2014-12-20 04:36:11 +00:00
Kp
6e24954a97
Mark warn_printf static
2014-12-13 04:10:58 +00:00
Kp
c6043419e9
Use std::abort in Error
...
Error is called for fatal errors. Use std::abort to get a core dump.
2014-12-11 02:38:19 +00:00
Kp
a2703177b9
Move Error Int3 to after printing the message
2014-12-09 01:10:24 +00:00
Kp
2ad59572e0
Use vector to manage string array memory
2014-09-29 00:02:43 +00:00
Kp
c698bb0082
Propagate for variables in common/misc/hmp.cpp
2014-09-26 02:42:14 +00:00
Kp
2c8a07cfa7
Use vector<uint8_t> to manage current_music_hndlbuf
2014-09-20 23:14:03 +00:00
Kp
2a0917cea4
Simplify MIDI header setup
2014-09-20 23:12:42 +00:00
Kp
5f5bd4e01d
Throw runtime_error on bad HMP decode
...
Returning 0 writes a zero into the length field, which will likely break
things later. Throw an exception to make bad HMPs obvious.
2014-08-26 03:19:59 +00:00
Kp
94550355a8
Use make_unique instead of bare new
2014-08-24 18:28:09 +00:00
Kp
efb8c495f6
Use unique_ptr for hmp_track data
2014-08-05 02:31:03 +00:00
Kp
81cb86f2e3
Use unique_ptr for hmp_file
2014-08-05 02:29:43 +00:00
Kp
a07376fe05
List initialize hmp event
2014-07-04 03:43:38 +00:00
zico
ad7cb106bc
Changed custom D1X license to GPLv3
2014-06-01 19:55:23 +02:00