mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-08 10:56:27 +00:00
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:
@@ -30,7 +30,7 @@
|
||||
void *SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len)
|
||||
{
|
||||
#if defined(__GNUC__) && (defined(HAVE_LIBC) && HAVE_LIBC)
|
||||
/* Presumably this is well tuned for speed. */
|
||||
// Presumably this is well tuned for speed.
|
||||
return __builtin_memmove(dst, src, len);
|
||||
#elif defined(HAVE_MEMMOVE)
|
||||
return memmove(dst, src, len);
|
||||
@@ -50,12 +50,12 @@ void *SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void
|
||||
}
|
||||
}
|
||||
return dst;
|
||||
#endif /* HAVE_MEMMOVE */
|
||||
#endif // HAVE_MEMMOVE
|
||||
}
|
||||
|
||||
|
||||
#ifndef HAVE_LIBC
|
||||
/* NOLINTNEXTLINE(readability-redundant-declaration) */
|
||||
// NOLINTNEXTLINE(readability-redundant-declaration)
|
||||
extern void *memmove(void *dst, const void *src, size_t len);
|
||||
#if defined(_MSC_VER) && !defined(__INTEL_LLVM_COMPILER)
|
||||
#pragma intrinsic(memmove)
|
||||
@@ -64,10 +64,10 @@ extern void *memmove(void *dst, const void *src, size_t len);
|
||||
#if defined(_MSC_VER) && !defined(__clang__)
|
||||
#pragma function(memmove)
|
||||
#endif
|
||||
/* NOLINTNEXTLINE(readability-inconsistent-declaration-parameter-name) */
|
||||
// NOLINTNEXTLINE(readability-inconsistent-declaration-parameter-name)
|
||||
void *memmove(void *dst, const void *src, size_t len)
|
||||
{
|
||||
return SDL_memmove(dst, src, len);
|
||||
}
|
||||
#endif /* !HAVE_LIBC */
|
||||
#endif // !HAVE_LIBC
|
||||
|
||||
|
Reference in New Issue
Block a user