Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions ds/frameRate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ namespace {
}

namespace device {
static_assert(dsUTL_DIM(_values) == dsVIDEO_FRAMERATE_MAX, "Frame rate values array size mismatch");
static_assert(dsUTL_DIM(_names) == dsVIDEO_FRAMERATE_MAX, "Frame rate values array size mismatch");

const int FrameRate::kUnknown = dsVIDEO_FRAMERATE_UNKNOWN;
Comment on lines 79 to 81
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

Removing the compile-time size checks for _values/_names drops the only guard that these lookup tables stay in sync with dsVIDEO_FRAMERATE_MAX. If the HAL adds a new frame-rate ID and dsVideoPortFrameRate_isValid() returns true for it, FrameRate(int id) will index past the end of these arrays.

Instead of deleting the checks, consider rewriting them in a way that compiles in this environment (e.g., use a sizeof(array)/sizeof(array[0]) expression or a small local constexpr helper) so mismatches are caught at build time.

Copilot uses AI. Check for mistakes.
Comment on lines 79 to 81
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

PR title mentions "Add FrameRate support", but this change only removes two static_asserts. If additional FrameRate support changes are intended, they may be missing from this PR; otherwise, the title/description should be updated to reflect the actual change.

Copilot uses AI. Check for mistakes.
const int FrameRate::k24 = dsVIDEO_FRAMERATE_24;
Expand Down
Loading