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:
@@ -51,7 +51,7 @@
|
||||
#include <mach/mach_time.h>
|
||||
#endif
|
||||
|
||||
/* Use CLOCK_MONOTONIC_RAW, if available, which is not subject to adjustment by NTP */
|
||||
// Use CLOCK_MONOTONIC_RAW, if available, which is not subject to adjustment by NTP
|
||||
#ifdef HAVE_CLOCK_GETTIME
|
||||
#ifdef CLOCK_MONOTONIC_RAW
|
||||
#define SDL_MONOTONIC_CLOCK CLOCK_MONOTONIC_RAW
|
||||
@@ -60,7 +60,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* The first ticks value of the application */
|
||||
// The first ticks value of the application
|
||||
#if !defined(HAVE_CLOCK_GETTIME) && defined(SDL_PLATFORM_APPLE)
|
||||
mach_timebase_info_data_t mach_base_info;
|
||||
#endif
|
||||
@@ -148,13 +148,13 @@ void SDL_SYS_DelayNS(Uint64 ns)
|
||||
|
||||
#ifdef SDL_PLATFORM_EMSCRIPTEN
|
||||
if (emscripten_has_asyncify() && SDL_GetHintBoolean(SDL_HINT_EMSCRIPTEN_ASYNCIFY, SDL_TRUE)) {
|
||||
/* pseudo-synchronous pause, used directly or through e.g. SDL_WaitEvent */
|
||||
// pseudo-synchronous pause, used directly or through e.g. SDL_WaitEvent
|
||||
emscripten_sleep(ns / SDL_NS_PER_MS);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Set the timeout interval */
|
||||
// Set the timeout interval
|
||||
#ifdef HAVE_NANOSLEEP
|
||||
remaining.tv_sec = (time_t)(ns / SDL_NS_PER_SECOND);
|
||||
remaining.tv_nsec = (long)(ns % SDL_NS_PER_SECOND);
|
||||
@@ -169,7 +169,7 @@ void SDL_SYS_DelayNS(Uint64 ns)
|
||||
tv.tv_nsec = remaining.tv_nsec;
|
||||
was_error = nanosleep(&tv, &remaining);
|
||||
#else
|
||||
/* Calculate the time interval left (in case of interrupt) */
|
||||
// Calculate the time interval left (in case of interrupt)
|
||||
now = SDL_GetTicksNS();
|
||||
elapsed = (now - then);
|
||||
then = now;
|
||||
@@ -181,8 +181,8 @@ void SDL_SYS_DelayNS(Uint64 ns)
|
||||
tv.tv_usec = SDL_NS_TO_US(ns % SDL_NS_PER_SECOND);
|
||||
|
||||
was_error = select(0, NULL, NULL, NULL, &tv);
|
||||
#endif /* HAVE_NANOSLEEP */
|
||||
#endif // HAVE_NANOSLEEP
|
||||
} while (was_error && (errno == EINTR));
|
||||
}
|
||||
|
||||
#endif /* SDL_TIMER_UNIX */
|
||||
#endif // SDL_TIMER_UNIX
|
||||
|
||||
Reference in New Issue
Block a user