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 @@
// just turn off clang-format for this whole file, this INDENT_OFF stuff on
// each EM_ASM section is ugly.
/* *INDENT-OFF* */ /* clang-format off */
/* *INDENT-OFF* */ // clang-format off
EM_JS_DEPS(sdlcamera, "$dynCall");
@@ -261,7 +261,7 @@ CameraBootStrap EMSCRIPTENCAMERA_bootstrap = {
"emscripten", "SDL Emscripten MediaStream camera driver", EMSCRIPTENCAMERA_Init, SDL_FALSE
};
/* *INDENT-ON* */ /* clang-format on */
/* *INDENT-ON* */ // clang-format on
#endif // SDL_CAMERA_DRIVER_EMSCRIPTEN

View File

@@ -449,7 +449,7 @@ static int MEDIAFOUNDATION_AcquireFrame(SDL_Camera *device, SDL_Surface *frame,
*timestampNS = timestamp100NS * 100; // the timestamps are in 100-nanosecond increments; move to full nanoseconds.
}
ret = (retval < 0) ? E_FAIL : IMFSample_ConvertToContiguousBuffer(objs->sample, &objs->buffer); /*IMFSample_GetBufferByIndex(objs->sample, 0, &objs->buffer);*/
ret = (retval < 0) ? E_FAIL : IMFSample_ConvertToContiguousBuffer(objs->sample, &objs->buffer); // IMFSample_GetBufferByIndex(objs->sample, 0, &objs->buffer);
if (FAILED(ret)) {
SDL_free(objs);
@@ -546,7 +546,7 @@ static int MEDIAFOUNDATION_AcquireFrame(SDL_Camera *device, SDL_Surface *frame,
}
IMFMediaBuffer *buffer = NULL;
ret = (retval < 0) ? E_FAIL : IMFSample_ConvertToContiguousBuffer(sample, &buffer); /*IMFSample_GetBufferByIndex(sample, 0, &buffer);*/
ret = (retval < 0) ? E_FAIL : IMFSample_ConvertToContiguousBuffer(sample, &buffer); // IMFSample_GetBufferByIndex(sample, 0, &buffer);
if (FAILED(ret)) {
retval = -1;
@@ -660,7 +660,7 @@ static HRESULT GetDefaultStride(IMFMediaType *pType, LONG *plStride)
GUID subtype = GUID_NULL;
UINT32 width = 0;
/* UINT32 height = 0; */
// UINT32 height = 0;
UINT64 val = 0;
// Get the subtype and the image size.
@@ -675,7 +675,7 @@ static HRESULT GetDefaultStride(IMFMediaType *pType, LONG *plStride)
}
width = (UINT32) (val >> 32);
/* height = (UINT32) val; */
// height = (UINT32) val;
ret = pMFGetStrideForBitmapInfoHeader(subtype.Data1, width, &lStride);
if (FAILED(ret)) {