Skip to content

Commit 1f5f2b7

Browse files
committed
Fix bool cast warnings on VS2015
1 parent 9ca2fe6 commit 1f5f2b7

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

Source/astcenc_decompress_symbolic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ void decompress_symbolic_block(
278278
const auto& bm = bsd.get_block_mode(scb.block_mode);
279279
const auto& di = bsd.get_decimation_info(bm.decimation_mode);
280280

281-
int is_dual_plane = bm.is_dual_plane;
281+
bool is_dual_plane = static_cast<bool>(bm.is_dual_plane);
282282

283283
// Unquantize and undecimate the weights
284284
int plane1_weights[BLOCK_MAX_TEXELS];

Source/astcenc_entry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ astcenc_error astcenc_context_alloc(
718718
}
719719

720720
ctx->bsd = aligned_malloc<block_size_descriptor>(sizeof(block_size_descriptor), ASTCENC_VECALIGN);
721-
bool can_omit_modes = config.flags & ASTCENC_FLG_SELF_DECOMPRESS_ONLY;
721+
bool can_omit_modes = static_cast<bool>(config.flags & ASTCENC_FLG_SELF_DECOMPRESS_ONLY);
722722
init_block_size_descriptor(config.block_x, config.block_y, config.block_z,
723723
can_omit_modes,
724724
config.tune_partition_count_limit,

Source/astcenc_pick_best_endpoint_format.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,8 +1124,8 @@ unsigned int compute_ideal_endpoint_formats(
11241124

11251125
promise(partition_count > 0);
11261126

1127-
int encode_hdr_rgb = blk.rgb_lns[0];
1128-
int encode_hdr_alpha = blk.alpha_lns[0];
1127+
bool encode_hdr_rgb = static_cast<bool>(blk.rgb_lns[0]);
1128+
bool encode_hdr_alpha = static_cast<bool>(blk.alpha_lns[0]);
11291129

11301130
// Compute the errors that result from various encoding choices (such as using luminance instead
11311131
// of RGB, discarding Alpha, using RGB-scale in place of two separate RGB endpoints and so on)

0 commit comments

Comments
 (0)