mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 09:34:19 +00:00
clang-format
This commit is contained in:
parent
5f5b80ae57
commit
a50ddb75ff
|
@ -3231,12 +3231,12 @@ int str_time(int64_t centisecs, int format, char *buffer, int buffer_size)
|
|||
if(centisecs >= day)
|
||||
return str_format(buffer, buffer_size, "%" PRId64 "d %02" PRId64 ":%02" PRId64 ":%02" PRId64, centisecs / day,
|
||||
(centisecs % day) / hour, (centisecs % hour) / min, (centisecs % min) / sec);
|
||||
[[fallthrough]];
|
||||
[[fallthrough]];
|
||||
case TIME_HOURS:
|
||||
if(centisecs >= hour)
|
||||
return str_format(buffer, buffer_size, "%02" PRId64 ":%02" PRId64 ":%02" PRId64, centisecs / hour,
|
||||
(centisecs % hour) / min, (centisecs % min) / sec);
|
||||
[[fallthrough]];
|
||||
[[fallthrough]];
|
||||
case TIME_MINS:
|
||||
return str_format(buffer, buffer_size, "%02" PRId64 ":%02" PRId64, centisecs / min,
|
||||
(centisecs % min) / sec);
|
||||
|
@ -3244,7 +3244,7 @@ int str_time(int64_t centisecs, int format, char *buffer, int buffer_size)
|
|||
if(centisecs >= hour)
|
||||
return str_format(buffer, buffer_size, "%02" PRId64 ":%02" PRId64 ":%02" PRId64 ".%02" PRId64, centisecs / hour,
|
||||
(centisecs % hour) / min, (centisecs % min) / sec, centisecs % sec);
|
||||
[[fallthrough]];
|
||||
[[fallthrough]];
|
||||
case TIME_MINS_CENTISECS:
|
||||
return str_format(buffer, buffer_size, "%02" PRId64 ":%02" PRId64 ".%02" PRId64, centisecs / min,
|
||||
(centisecs % min) / sec, centisecs % sec);
|
||||
|
|
|
@ -620,7 +620,7 @@ int CInput::Update()
|
|||
case SDL_MOUSEBUTTONUP:
|
||||
Action = IInput::FLAG_RELEASE;
|
||||
|
||||
[[fallthrough]];
|
||||
[[fallthrough]];
|
||||
case SDL_MOUSEBUTTONDOWN:
|
||||
if(Event.button.button == SDL_BUTTON_LEFT)
|
||||
Scancode = KEY_MOUSE_1;
|
||||
|
@ -704,7 +704,7 @@ int CInput::Update()
|
|||
MouseModeAbsolute();
|
||||
MouseModeRelative();
|
||||
#endif
|
||||
[[fallthrough]];
|
||||
[[fallthrough]];
|
||||
case SDL_WINDOWEVENT_RESTORED:
|
||||
Graphics()->WindowCreateNtf(Event.window.windowID);
|
||||
break;
|
||||
|
|
|
@ -78,7 +78,7 @@ static int websocket_callback(struct lws *wsi, enum lws_callback_reasons reason,
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
[[fallthrough]];
|
||||
[[fallthrough]];
|
||||
case LWS_CALLBACK_ESTABLISHED:
|
||||
{
|
||||
pss->wsi = wsi;
|
||||
|
@ -116,7 +116,7 @@ static int websocket_callback(struct lws *wsi, enum lws_callback_reasons reason,
|
|||
break;
|
||||
|
||||
case LWS_CALLBACK_CLIENT_WRITEABLE:
|
||||
[[fallthrough]];
|
||||
[[fallthrough]];
|
||||
case LWS_CALLBACK_SERVER_WRITEABLE:
|
||||
{
|
||||
websocket_chunk *chunk = (websocket_chunk *)pss->send_buffer.First();
|
||||
|
@ -140,7 +140,7 @@ static int websocket_callback(struct lws *wsi, enum lws_callback_reasons reason,
|
|||
break;
|
||||
|
||||
case LWS_CALLBACK_CLIENT_RECEIVE:
|
||||
[[fallthrough]];
|
||||
[[fallthrough]];
|
||||
case LWS_CALLBACK_RECEIVE:
|
||||
if(pss->addr_str.empty())
|
||||
return -1;
|
||||
|
|
|
@ -778,7 +778,7 @@ int CPlayer::Pause(int State, bool Force)
|
|||
m_ViewPos = m_pCharacter->m_Pos;
|
||||
GameServer()->CreatePlayerSpawn(m_pCharacter->m_Pos, GameServer()->m_pController->GetMaskForPlayerWorldEvent(m_ClientID));
|
||||
}
|
||||
[[fallthrough]];
|
||||
[[fallthrough]];
|
||||
case PAUSE_SPEC:
|
||||
if(g_Config.m_SvPauseMessages)
|
||||
{
|
||||
|
|
|
@ -369,13 +369,13 @@ int CSaveTee::FromString(const char *String)
|
|||
{
|
||||
case 96:
|
||||
m_NotEligibleForFinish = false;
|
||||
[[fallthrough]];
|
||||
[[fallthrough]];
|
||||
case 97:
|
||||
m_HasTelegunGrenade = 0;
|
||||
m_HasTelegunLaser = 0;
|
||||
m_HasTelegunGun = 0;
|
||||
FormatUuid(CalculateUuid("game-uuid-nonexistent@ddnet.tw"), m_aGameUuid, sizeof(m_aGameUuid));
|
||||
[[fallthrough]];
|
||||
[[fallthrough]];
|
||||
case 101:
|
||||
m_HookedPlayer = -1;
|
||||
m_NewHook = false;
|
||||
|
@ -386,13 +386,13 @@ int CSaveTee::FromString(const char *String)
|
|||
m_InputFire = 0;
|
||||
m_InputHook = 0;
|
||||
m_ReloadTimer = 0;
|
||||
[[fallthrough]];
|
||||
[[fallthrough]];
|
||||
case 108:
|
||||
m_TeeStarted = true;
|
||||
[[fallthrough]];
|
||||
[[fallthrough]];
|
||||
case 109:
|
||||
m_LiveFreeze = 0;
|
||||
[[fallthrough]];
|
||||
[[fallthrough]];
|
||||
case 110:
|
||||
return 0;
|
||||
default:
|
||||
|
@ -613,7 +613,7 @@ int CSaveTeam::FromString(const char *String)
|
|||
{
|
||||
case 4:
|
||||
m_Practice = false;
|
||||
[[fallthrough]];
|
||||
[[fallthrough]];
|
||||
case 5:
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue