Skip to content

Conversation

@RamType0
Copy link
Owner

No description provided.

@RamType0 RamType0 changed the base branch from main to develop December 26, 2025 16:57
@RamType0 RamType0 self-assigned this Dec 26, 2025
@RamType0 RamType0 requested a review from Copilot December 26, 2025 16:58
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an exception that was thrown when attempting to heapify an empty queue. The fix adds an early return guard in the Heapify() method to handle queues with 0 or 1 elements, removes an unnecessary conditional check before Heapify() is called, and adds parameter validation to GetParentIndex() to enforce that the index must be at least 1.

Key Changes

  • Added early return in Heapify() for queues with 0 or 1 elements
  • Removed redundant Count > 1 check before calling Heapify()
  • Added AssumeRange attribute to GetParentIndex() parameter for validation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@RamType0 RamType0 merged commit 6021336 into develop Dec 26, 2025
9 of 12 checks passed
@RamType0 RamType0 deleted the fix-empty-heapify branch December 26, 2025 17:03
@RamType0 RamType0 linked an issue Dec 26, 2025 that may be closed by this pull request
@RamType0 RamType0 restored the fix-empty-heapify branch December 26, 2025 17:04
@RamType0 RamType0 deleted the fix-empty-heapify branch December 26, 2025 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

メッシュ調整をすると範囲外エラーで動かなくなる

2 participants