Skip to content

Commit

Permalink
misc: fix formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rr- committed Aug 30, 2024
1 parent 641824b commit 5b2460c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ AllowShortFunctionsOnASingleLine: None
AlwaysBreakAfterReturnType: None
BasedOnStyle: Webkit
BreakBeforeBinaryOperators: NonAssignment
BreakAdjacentStringLiterals: true
AlwaysBreakBeforeMultilineStrings: true
ColumnLimit: 80
IndentPPDirectives: BeforeHash
NamespaceIndentation: None
Expand Down
10 changes: 6 additions & 4 deletions src/game/savegame/savegame_bson.c
Original file line number Diff line number Diff line change
Expand Up @@ -1347,8 +1347,9 @@ bool Savegame_BSON_LoadFromFile(MYFILE *fp, GAME_INFO *game_info)
if (!Savegame_BSON_LoadResumeInfo(
json_object_get_array(root_obj, "current_info"),
game_info->current)) {
LOG_WARNING("Failed to load RESUME_INFO current properly. Checking if "
"save is legacy.");
LOG_WARNING(
"Failed to load RESUME_INFO current properly. "
"Checking if save is legacy.");
// Check for 2.6 and 2.7 legacy start and end info.
if (!Savegame_BSON_LoadDiscontinuedStartInfo(
json_object_get_array(root_obj, "start_info"), game_info)) {
Expand Down Expand Up @@ -1433,8 +1434,9 @@ bool Savegame_BSON_LoadOnlyResumeInfo(MYFILE *fp, GAME_INFO *game_info)
if (!Savegame_BSON_LoadResumeInfo(
json_object_get_array(root_obj, "current_info"),
game_info->current)) {
LOG_WARNING("Failed to load RESUME_INFO current properly. Checking if "
"save is legacy.");
LOG_WARNING(
"Failed to load RESUME_INFO current properly. Checking if "
"save is legacy.");
// Check for 2.6 and 2.7 legacy start and end info.
if (!Savegame_BSON_LoadDiscontinuedStartInfo(
json_object_get_array(root_obj, "start_info"), game_info)) {
Expand Down
4 changes: 2 additions & 2 deletions src/game/sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,8 +489,8 @@ void Sound_ResetEffects(void)
int32_t mode = s->flags & 3;
if (mode == SOUND_MODE_AMBIENT) {
if (m_AmbientLookupIdx >= MAX_AMBIENT_FX) {
Shell_ExitSystem("Ran out of ambient fx slots in "
"Sound_ResetEffects()");
Shell_ExitSystem(
"Ran out of ambient fx slots in Sound_ResetEffects()");
}
m_AmbientLookup[m_AmbientLookupIdx] = i;
m_AmbientLookupIdx++;
Expand Down
13 changes: 6 additions & 7 deletions src/specific/s_fmv.c
Original file line number Diff line number Diff line change
Expand Up @@ -575,14 +575,13 @@ static int S_FMV_DecoderDecodeFrame(Decoder *d, AVFrame *frame, AVSubtitle *sub)
: (d->pkt->data ? AVERROR(EAGAIN) : AVERROR_EOF);
}
av_packet_unref(d->pkt);
} else if (avcodec_send_packet(d->avctx, d->pkt) == AVERROR(EAGAIN)) {
LOG_ERROR(
"Receive_frame and send_packet both returned EAGAIN, "
"which is an API violation.");
d->packet_pending = true;
} else {
if (avcodec_send_packet(d->avctx, d->pkt) == AVERROR(EAGAIN)) {
LOG_ERROR("Receive_frame and send_packet both returned EAGAIN, "
"which is an API violation.");
d->packet_pending = true;
} else {
av_packet_unref(d->pkt);
}
av_packet_unref(d->pkt);
}
}
}
Expand Down

0 comments on commit 5b2460c

Please sign in to comment.