Skip to content

Replacing C-style typedefs with aliases. #2945

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion torchvision/csrc/cpu/decoder/decoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#if defined(_MSC_VER)
#include <BaseTsd.h>
typedef SSIZE_T ssize_t;
using ssize_t = SSIZE_T;
#endif

namespace ffmpeg {
Expand Down
2 changes: 1 addition & 1 deletion torchvision/csrc/cpu/image/jpegcommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct torch_jpeg_error_mgr {
jmp_buf setjmp_buffer; /* for return to caller */
};

typedef struct torch_jpeg_error_mgr* torch_jpeg_error_ptr;
using torch_jpeg_error_ptr = struct torch_jpeg_error_mgr*;
void torch_jpeg_error_exit(j_common_ptr cinfo);

#endif
2 changes: 1 addition & 1 deletion torchvision/csrc/cpu/image/writepng_cpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ struct torch_png_error_mgr {
jmp_buf setjmp_buffer; /* for return to caller */
};

typedef torch_png_error_mgr* torch_png_error_mgr_ptr;
using torch_png_error_mgr_ptr = torch_png_error_mgr*;

void torch_png_warn(png_structp png_ptr, png_const_charp warn_msg) {
/* Display warning to user */
Expand Down