Use C++ style comments consistently in SDL source code
Implemented using this script: find . -type f -exec sed -i'' -e 's,/\* *\([^*]*\)\*/ *$,// \1,' -e 's, \+$,,' {} \; git checkout \ core/linux/SDL_evdev_kbd_default_keymap.h \ events/imKStoUCS.* \ hidapi \ joystick/controller_type.c \ joystick/controller_type.h \ joystick/hidapi/steam/controller_constants.h \ joystick/hidapi/steam/controller_structs.h \ joystick/SDL_gamepad_db.h \ libm \ render/*/*Shader*.h \ render/vitagxm/SDL_render_vita_gxm_shaders.h \ render/metal/SDL_shaders_metal_*.h \ stdlib/SDL_malloc.c \ stdlib/SDL_qsort.c \ stdlib/SDL_strtokr.c \ test/ \ video/directx/SDL_d3d12_xbox_cmacros.h \ video/directx/d3d12.h \ video/directx/d3d12sdklayers.h \ video/khronos \ video/x11/edid-parse.c \ video/x11/xsettings-client.* \ video/yuv2rgb sed -i'' -e 's,/\* *\([^*]*\)\*/ *$,// \1,' -e 's, \+$,,' hidapi/SDL_hidapi.c
This commit is contained in:
parent
658fc3db0f
commit
6501e90018
743 changed files with 11882 additions and 11882 deletions
|
@ -78,7 +78,7 @@ char *convert_filters(const SDL_DialogFileFilter *filters, int nfilters,
|
|||
SDL_free(converted);
|
||||
}
|
||||
|
||||
/* If the filter list is empty, put the suffix */
|
||||
// If the filter list is empty, put the suffix
|
||||
if (!filters->name || !filters->pattern) {
|
||||
new_length = SDL_strlen(combined) + SDL_strlen(suffix) + 1;
|
||||
|
||||
|
@ -117,7 +117,7 @@ char *convert_filter(const SDL_DialogFileFilter filter, NameTransform ntf,
|
|||
if (ntf) {
|
||||
name_filtered = ntf(filter.name);
|
||||
} else {
|
||||
/* Useless strdup, but easier to read and maintain code this way */
|
||||
// Useless strdup, but easier to read and maintain code this way
|
||||
name_filtered = SDL_strdup(filter.name);
|
||||
}
|
||||
|
||||
|
@ -161,10 +161,10 @@ char *convert_ext_list(const char *list, const char *prefix,
|
|||
}
|
||||
|
||||
total_length =
|
||||
SDL_strlen(list) - semicolons /* length of list contents */
|
||||
+ semicolons * SDL_strlen(separator) /* length of separators */
|
||||
+ SDL_strlen(prefix) + SDL_strlen(suffix) /* length of prefix/suffix */
|
||||
+ 1; /* terminating null byte */
|
||||
SDL_strlen(list) - semicolons // length of list contents
|
||||
+ semicolons * SDL_strlen(separator) // length of separators
|
||||
+ SDL_strlen(prefix) + SDL_strlen(suffix) // length of prefix/suffix
|
||||
+ 1; // terminating null byte
|
||||
|
||||
converted = (char *) SDL_malloc(total_length);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue