Skip to content

Commit

Permalink
Fixed a few Clang warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
apanteleev committed Sep 29, 2021
1 parent 23920ff commit b611dca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/client/sound/ogg.c
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ OGG_RecoverState(void)

static void ogg_enable_changed(cvar_t *self)
{
if (ogg_enable->integer && ogg_status == PAUSE || !ogg_enable->integer && ogg_status == PLAY)
if ((ogg_enable->integer && ogg_status == PAUSE) || (!ogg_enable->integer && ogg_status == PLAY))
{
OGG_TogglePlayback();
}
Expand Down
6 changes: 3 additions & 3 deletions src/refresh/vkpt/bsp_mesh.c
Original file line number Diff line number Diff line change
Expand Up @@ -1185,7 +1185,7 @@ collect_sky_and_lava_light_polys(bsp_mesh_t *wm, bsp_t* bsp)
light.cluster = BSP_PointLeaf(bsp->nodes, light.off_center)->cluster;

if (is_sky_or_lava_cluster(wm, surf, light.cluster, surf->texinfo->material->flags) ||
cvar_pt_bsp_sky_lights->integer && is_sky && is_light && (cvar_pt_bsp_sky_lights->integer > 1 || !is_nodraw))
(cvar_pt_bsp_sky_lights->integer && is_sky && is_light && (cvar_pt_bsp_sky_lights->integer > 1 || !is_nodraw)))
{
light_poly_t* list_light = append_light_poly(&wm->num_light_polys, &wm->allocated_light_polys, &wm->light_polys);
memcpy(list_light, &light, sizeof(light_poly_t));
Expand Down Expand Up @@ -1414,7 +1414,7 @@ load_sky_and_lava_clusters(bsp_mesh_t* wm, const char* map_name)
const char* word = strtok(linebuf, delimiters);
while (word)
{
if (word[0] >= 'a' && word[0] <= 'z' || word[0] >= 'A' && word[0] <= 'Z')
if ((word[0] >= 'a' && word[0] <= 'z') || (word[0] >= 'A' && word[0] <= 'Z'))
{
qboolean matches = strcmp(word, map_name) == 0;

Expand Down Expand Up @@ -1472,7 +1472,7 @@ load_cameras(bsp_mesh_t* wm, const char* map_name)


vec3_t pos, dir;
if (linebuf[0] >= 'a' && linebuf[0] <= 'z' || linebuf[0] >= 'A' && linebuf[0] <= 'Z')
if ((linebuf[0] >= 'a' && linebuf[0] <= 'z') || (linebuf[0] >= 'A' && linebuf[0] <= 'Z'))
{
const char* delimiters = " \t\r\n";
const char* word = strtok(linebuf, delimiters);
Expand Down
2 changes: 1 addition & 1 deletion src/refresh/vkpt/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3238,7 +3238,7 @@ R_EndFrame_RTX(void)
extent_unscaled_half.height = qvk.extent_unscaled.height / 2;

if (extents_equal(qvk.extent_render, qvk.extent_unscaled) ||
extents_equal(qvk.extent_render, extent_unscaled_half) && drs_effective_scale == 0) // don't do nearest filter 2x upscale with DRS enabled
(extents_equal(qvk.extent_render, extent_unscaled_half) && drs_effective_scale == 0)) // don't do nearest filter 2x upscale with DRS enabled
vkpt_final_blit_simple(cmd_buf, qvk.images[VKPT_IMG_TAA_OUTPUT], qvk.extent_taa_output);
else
vkpt_final_blit_filtered(cmd_buf);
Expand Down

0 comments on commit b611dca

Please sign in to comment.