Skip to content

Commit e4467d0

Browse files
committed
Fix array pointer comparison error, add comment
This prevented compilation using clang++ and C++ 26 standard: error: comparison between two arrays is ill-formed in C++26; to compare array addresses, use unary '+' to decay operands to pointers [-Warray-compare-cxx26]
1 parent 5658107 commit e4467d0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Descent3/robotfire.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ void WBSetupFireAnim(object *obj, otype_wb_info *static_wb, int wb_index) {
6868

6969
p_dwb->wb_anim_mask = p_dwb->cur_firing_mask;
7070

71-
if (static_wb->anim_start_frame != static_wb->anim_end_frame) {
71+
// LGT: Awkward array comparison by pointer, needs investivation to understand the actual intent
72+
if (+static_wb->anim_start_frame != static_wb->anim_end_frame) {
7273
p_dwb->flags |= DWBF_ANIMATING;
7374
p_dwb->wb_anim_frame = static_wb->anim_start_frame[p_dwb->cur_firing_mask];
7475
}

0 commit comments

Comments
 (0)