Skip to content

Commit adef83c

Browse files
committed
Using newest version of clang-format
1 parent d59e480 commit adef83c

File tree

4 files changed

+29
-29
lines changed

4 files changed

+29
-29
lines changed

src_c/SDL_gfx/SDL_gfxPrimitives.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4226,7 +4226,8 @@ lrint(double flt)
42264226
#include <armintr.h>
42274227
#pragma warning(push)
42284228
#pragma warning(disable : 4716)
4229-
__declspec(naked) long int lrint(double flt)
4229+
__declspec(naked) long int
4230+
lrint(double flt)
42304231
{
42314232
__emit(0xEC410B10); // fmdrr d0, r0, r1
42324233
__emit(0xEEBD0B40); // ftosid s0, d0

src_c/color.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
#if (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) && \
5151
!defined(round)
52-
#define pg_round(d) (((d < 0) ? (ceil((d)-0.5)) : (floor((d) + 0.5))))
52+
#define pg_round(d) (((d < 0) ? (ceil((d) - 0.5)) : (floor((d) + 0.5))))
5353
#else
5454
#define pg_round(d) round(d)
5555
#endif

src_c/event.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1245,7 +1245,7 @@ dict_from_event(SDL_Event *event)
12451245
}
12461246
break;
12471247
#endif /* (defined(unix) || ... */
1248-
} /* switch (event->type) */
1248+
} /* switch (event->type) */
12491249
/* Events that dont have any attributes are not handled in switch
12501250
* statement */
12511251
SDL_Window *window;

src_c/freetype/ft_wrap.c

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ ft_wrap_quit(pgFontObject *);
3838
*
3939
*********************************************************/
4040
void
41-
_PGFT_SetError(FreeTypeInstance *ft, const char *error_msg, FT_Error error_id)
42-
{
41+
_PGFT_SetError(FreeTypeInstance *ft, const char *error_msg, FT_Error error_id){
4342
#undef __FTERRORS_H__
4443
#define FT_ERRORDEF(e, v, s) {e, s},
4544
#define FT_ERROR_START_LIST {
@@ -49,37 +48,37 @@ _PGFT_SetError(FreeTypeInstance *ft, const char *error_msg, FT_Error error_id)
4948
} \
5049
} \
5150
;
52-
static const struct {
53-
int err_code;
54-
const char *err_msg;
55-
} ft_errors[] =
51+
static const struct {int err_code;
52+
const char *err_msg;
53+
}
54+
ft_errors[] =
5655
#include FT_ERRORS_H
5756

58-
const int maxlen = (int)(sizeof(ft->_error_msg)) - 1;
59-
int i;
60-
const char *ft_msg;
57+
const int maxlen = (int)(sizeof(ft->_error_msg)) - 1;
58+
int i;
59+
const char *ft_msg;
6160

62-
ft_msg = 0;
63-
for (i = 0; ft_errors[i].err_msg; ++i) {
64-
if (error_id == ft_errors[i].err_code) {
65-
ft_msg = ft_errors[i].err_msg;
66-
break;
67-
}
61+
ft_msg = 0;
62+
for (i = 0; ft_errors[i].err_msg; ++i) {
63+
if (error_id == ft_errors[i].err_code) {
64+
ft_msg = ft_errors[i].err_msg;
65+
break;
6866
}
67+
}
6968

70-
if (error_id && ft_msg) {
71-
int ret = PyOS_snprintf(ft->_error_msg, sizeof(ft->_error_msg),
72-
"%.*s: %s", maxlen - 3, error_msg, ft_msg);
73-
if (ret >= 0) {
74-
/* return after successfully copying full or truncated error.
75-
* If ret < 0, PyOS_snprintf failed so try to strncpy error
76-
* message */
77-
return;
78-
}
69+
if (error_id && ft_msg) {
70+
int ret = PyOS_snprintf(ft->_error_msg, sizeof(ft->_error_msg), "%.*s: %s",
71+
maxlen - 3, error_msg, ft_msg);
72+
if (ret >= 0) {
73+
/* return after successfully copying full or truncated error.
74+
* If ret < 0, PyOS_snprintf failed so try to strncpy error
75+
* message */
76+
return;
7977
}
78+
}
8079

81-
strncpy(ft->_error_msg, error_msg, maxlen);
82-
ft->_error_msg[maxlen] = '\0'; /* in case of message truncation */
80+
strncpy(ft->_error_msg, error_msg, maxlen);
81+
ft->_error_msg[maxlen] = '\0'; /* in case of message truncation */
8382
}
8483

8584
const char *

0 commit comments

Comments
 (0)