Browse Source

access: move SelectedTrackerTargetCategory to anonymous namespace

The variable is only used within tracker.cpp, so remove the unnecessary
extern declaration from the header and place it in the anonymous
namespace alongside the other file-local tracker state.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
pull/8474/head
hidwood 2 months ago
parent
commit
9799f418a9
  1. 4
      Source/controls/tracker.cpp
  2. 2
      Source/controls/tracker.hpp

4
Source/controls/tracker.cpp

@ -50,10 +50,10 @@
namespace devilution {
TrackerTargetCategory SelectedTrackerTargetCategory = TrackerTargetCategory::Items;
namespace {
TrackerTargetCategory SelectedTrackerTargetCategory = TrackerTargetCategory::Items;
TrackerTargetCategory AutoWalkTrackerTargetCategory = TrackerTargetCategory::Items; ///< Category of the active auto-walk target.
int AutoWalkTrackerTargetId = -1; ///< ID of the target being auto-walked to, or -1 if inactive.

2
Source/controls/tracker.hpp

@ -20,8 +20,6 @@ enum class TrackerTargetCategory : uint8_t {
DeadBodies,
};
extern TrackerTargetCategory SelectedTrackerTargetCategory;
void CycleTrackerTargetKeyPressed();
void NavigateToTrackerTargetKeyPressed();
void AutoWalkToTrackerTargetKeyPressed();

Loading…
Cancel
Save