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:
@@ -23,7 +23,7 @@
|
||||
#ifdef SDL_LOADSO_DLOPEN
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
/* System dependent library loading routines */
|
||||
// System dependent library loading routines
|
||||
|
||||
#include <stdio.h>
|
||||
#include <dlfcn.h>
|
||||
@@ -56,7 +56,7 @@ SDL_FunctionPointer SDL_LoadFunction(void *handle, const char *name)
|
||||
{
|
||||
void *symbol = dlsym(handle, name);
|
||||
if (!symbol) {
|
||||
/* prepend an underscore for platforms that need that. */
|
||||
// prepend an underscore for platforms that need that.
|
||||
SDL_bool isstack;
|
||||
size_t len = SDL_strlen(name) + 1;
|
||||
char *_name = SDL_small_alloc(char, len + 1, &isstack);
|
||||
@@ -79,4 +79,4 @@ void SDL_UnloadObject(void *handle)
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* SDL_LOADSO_DLOPEN */
|
||||
#endif // SDL_LOADSO_DLOPEN
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#if defined(SDL_LOADSO_DUMMY)
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
/* System dependent library loading routines */
|
||||
// System dependent library loading routines
|
||||
|
||||
void *SDL_LoadObject(const char *sofile)
|
||||
{
|
||||
@@ -41,7 +41,7 @@ SDL_FunctionPointer SDL_LoadFunction(void *handle, const char *name)
|
||||
|
||||
void SDL_UnloadObject(void *handle)
|
||||
{
|
||||
/* no-op. */
|
||||
// no-op.
|
||||
}
|
||||
|
||||
#endif /* SDL_LOADSO_DUMMY */
|
||||
#endif // SDL_LOADSO_DUMMY
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#ifdef SDL_LOADSO_WINDOWS
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
/* System dependent library loading routines */
|
||||
// System dependent library loading routines
|
||||
|
||||
#include "../../core/windows/SDL_windows.h"
|
||||
|
||||
@@ -48,7 +48,7 @@ void *SDL_LoadObject(const char *sofile)
|
||||
#endif
|
||||
SDL_free(wstr);
|
||||
|
||||
/* Generate an error message if all loads failed */
|
||||
// Generate an error message if all loads failed
|
||||
if (!handle) {
|
||||
char errbuf[512];
|
||||
SDL_strlcpy(errbuf, "Failed loading ", SDL_arraysize(errbuf));
|
||||
@@ -77,4 +77,4 @@ void SDL_UnloadObject(void *handle)
|
||||
}
|
||||
}
|
||||
|
||||
#endif /* SDL_LOADSO_WINDOWS */
|
||||
#endif // SDL_LOADSO_WINDOWS
|
||||
|
||||
Reference in New Issue
Block a user