Skip to content

Commit

Permalink
Use std::array instead of built-in arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
jonfryd committed Dec 21, 2024
1 parent 83b8650 commit 8d168d5
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions video_compare.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,22 +131,22 @@ class VideoCompare {
const size_t frame_buffer_size_;
const double time_shift_ms_;

std::unique_ptr<Demuxer> demuxers_[Side::Count];
std::unique_ptr<VideoDecoder> video_decoders_[Side::Count];
std::unique_ptr<VideoFilterer> video_filterers_[Side::Count];
const std::array<std::unique_ptr<Demuxer>, Side::Count> demuxers_;
const std::array<std::unique_ptr<VideoDecoder>, Side::Count> video_decoders_;
const std::array<std::unique_ptr<VideoFilterer>, Side::Count> video_filterers_;

const size_t max_width_;
const size_t max_height_;
const bool initial_fast_input_alignment_;
const double shortest_duration_;

std::unique_ptr<FormatConverter> format_converters_[Side::Count];
const std::array<std::unique_ptr<FormatConverter>, Side::Count> format_converters_;
const std::unique_ptr<Display> display_;
const std::unique_ptr<Timer> timer_;
std::unique_ptr<PacketQueue> packet_queues_[Side::Count];
const std::shared_ptr<DecodedFrameQueue> decoded_frame_queues_[Side::Count];
std::unique_ptr<FrameQueue> filtered_frame_queues_[Side::Count];
std::unique_ptr<FrameQueue> converted_frame_queues_[Side::Count];
const std::array<std::unique_ptr<PacketQueue>, Side::Count> packet_queues_;
const std::array<std::shared_ptr<DecodedFrameQueue>, Side::Count> decoded_frame_queues_;
const std::array<std::unique_ptr<FrameQueue>, Side::Count> filtered_frame_queues_;
const std::array<std::unique_ptr<FrameQueue>, Side::Count> converted_frame_queues_;

std::vector<std::thread> stages_;

Expand Down

0 comments on commit 8d168d5

Please sign in to comment.