Skip to content

Adjust all places where RPC::IteratorType is created to use std::vector#372

Merged
VeithMetro merged 5 commits intomasterfrom
development/iterator-type-vector
Mar 30, 2026
Merged

Adjust all places where RPC::IteratorType is created to use std::vector#372
VeithMetro merged 5 commits intomasterfrom
development/iterator-type-vector

Conversation

@VeithMetro
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor

@sebaszm sebaszm left a comment

Choose a reason for hiding this comment

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

In some cases we have an idea how much elements will be pushed to the vector, so I suppose reserve() would be beneficial?

@VeithMetro VeithMetro requested a review from sebaszm December 15, 2025 08:44
Copilot AI review requested due to automatic review settings March 30, 2026 07:11
@VeithMetro VeithMetro requested a review from sebaszm March 30, 2026 07:12
Copy link
Copy Markdown
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 updates several plugin implementations to construct RPC::IteratorType instances backed by std::vector instead of list-based containers, aligning iterator creation with vector storage and enabling more efficient moves/reserving in some call sites.

Changes:

  • Replaced multiple std::list usage sites with std::vector and added reserve() where sizes are known.
  • Updated RPC::IteratorType<...> aliases to explicitly specify std::vector<...> as the backing container and used std::move when passing temporary containers.
  • Adjusted container-filling code paths (e.g., std::transform inserters) to match std::vector.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
WebKitBrowser/WebKitBrowser.cpp Switch language iterator backing store to std::vector with reserve() and move into iterator.
PlayerInfo/GStreamer/PlatformImplementation.cpp Change codec storage members to std::vector, reserve based on caps map size, and update iterator typedefs accordingly.
PlayerInfo/DeviceSettings/PlatformImplementation.cpp Same codec container migration to std::vector + reserve(), and iterator typedef updates.
MessageControl/MessageControl.h Use std::vector for module/control lists and move into vector-backed iterators.
DisplayInfo/DeviceSettings/PlatformImplementation.cpp Use std::vector for HDR/colorimetry capability lists and move into iterators; add small fixed reserve().
DeviceInfo/DeviceInfoImplementation.h Change output list aliases to std::vector and update iterator typedefs to vector-backed iterators.
DeviceInfo/DeviceInfoImplementation.cpp Use std::vector for output iterator snapshots (reserve + back_inserter + move) and update several iterator typedefs to vector-backed iterators.

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

@VeithMetro VeithMetro merged commit 86e608f into master Mar 30, 2026
40 checks passed
@VeithMetro VeithMetro deleted the development/iterator-type-vector branch March 30, 2026 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants