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:
Sam Lantinga
2024-08-22 10:30:45 -07:00
parent 658fc3db0f
commit 6501e90018
743 changed files with 11882 additions and 11882 deletions

View File

@@ -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