Opened 9 years ago

Closed 9 years ago

#3480 closed defect (fixed)

Pathfinder - some compiler warnings

Reported by: elexis Owned by: Itms
Priority: Should Have Milestone: Alpha 19
Component: Core engine Keywords: pathfinding
Cc: Patch:

Description

In file included from ../../../source/simulation2/helpers/LongPathfinder.h:21:0,
                 from ../../../source/simulation2/helpers/LongPathfinder.cpp:20:
../../../source/simulation2/helpers/LongPathfinder.cpp: In member function ‘void LongPathfinder::ComputePath(entity_pos_t, entity_pos_t, const PathGoal&, pass_class_t, std::vector<CircularRegion>, WaypointPath&)’:
../../../source/simulation2/helpers/Pathfinding.h:102:59: warning: suggest parentheses around ‘-’ inside ‘<<’ [-Wparentheses]
 #define PASS_CLASS_MASK_FROM_INDEX(id) ((pass_class_t)(1u << id))
                                                           ^
../../../source/simulation2/helpers/Pathfinding.h:103:28: note: in expansion of macro ‘PASS_CLASS_MASK_FROM_INDEX’
 #define SPECIAL_PASS_CLASS PASS_CLASS_MASK_FROM_INDEX(PASS_CLASS_BITS-1) // 16th bit, used for special in-place computations
                            ^
../../../source/simulation2/helpers/LongPathfinder.cpp:1109:32: note: in expansion of macro ‘SPECIAL_PASS_CLASS’
  ComputePath(x0, z0, origGoal, SPECIAL_PASS_CLASS, path);
                                ^
../../../source/simulation2/helpers/LongPathfinder.cpp: In member function ‘void LongPathfinder::GenerateSpecialMap(pass_class_t, std::vector<CircularRegion>)’:
../../../source/simulation2/helpers/Pathfinding.h:102:59: warning: suggest parentheses around ‘-’ inside ‘<<’ [-Wparentheses]
 #define PASS_CLASS_MASK_FROM_INDEX(id) ((pass_class_t)(1u << id))
                                                           ^
../../../source/simulation2/helpers/Pathfinding.h:103:28: note: in expansion of macro ‘PASS_CLASS_MASK_FROM_INDEX’
 #define SPECIAL_PASS_CLASS PASS_CLASS_MASK_FROM_INDEX(PASS_CLASS_BITS-1) // 16th bit, used for special in-place computations
                            ^
../../../source/simulation2/helpers/LongPathfinder.cpp:1129:10: note: in expansion of macro ‘SPECIAL_PASS_CLASS’
     n |= SPECIAL_PASS_CLASS;
          ^
../../../source/simulation2/helpers/Pathfinding.h:102:59: warning: suggest parentheses around ‘-’ inside ‘<<’ [-Wparentheses]
 #define PASS_CLASS_MASK_FROM_INDEX(id) ((pass_class_t)(1u << id))
                                                           ^
../../../source/simulation2/helpers/Pathfinding.h:103:28: note: in expansion of macro ‘PASS_CLASS_MASK_FROM_INDEX’
 #define SPECIAL_PASS_CLASS PASS_CLASS_MASK_FROM_INDEX(PASS_CLASS_BITS-1) // 16th bit, used for special in-place computations
                            ^
../../../source/simulation2/helpers/LongPathfinder.cpp:1139:10: note: in expansion of macro ‘SPECIAL_PASS_CLASS’
     n |= SPECIAL_PASS_CLASS;
          ^

Change History (1)

comment:1 by Itms, 9 years ago

Resolution: fixed
Status: newclosed

In 17101:

Remove a preprocessor ambiguity, fixes #3480.

Note: See TracTickets for help on using tickets.