Skip to content

remove rs2 structs from context.h - #12289

Merged
maloel merged 2 commits into
realsenseai:developmentfrom
maloel:device-list
Oct 16, 2023
Merged

remove rs2 structs from context.h#12289
maloel merged 2 commits into
realsenseai:developmentfrom
maloel:device-list

Conversation

@maloel

@maloel maloel commented Oct 12, 2023

Copy link
Copy Markdown
Contributor

The rs2_device_list struct, outside of librealsense namespace, was used all the way in the device factories.

  • changed device-factories to use std::vector< std::shared_ptr< device_info > > instead
  • changed context::on_device_changes() to accept a callback, rather than rs2 concepts
  • removed rs2_device_info and changed rs2_device_list to also use std::vector< std::shared_ptr< device_info > >
  • moved rs2_device_list into rs.cpp
  • moved rs2_stream_profile into stream.h until the latter is refactored, too
  • removed context.h includes where not needed

Tracked on [LRS-921]

@maloel
maloel requested review from OhadMeir and SamerKhshiboun and removed request for SamerKhshiboun October 12, 2023 07:32

@OhadMeir OhadMeir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good job simplifying the code and cleaning unneeded includes

@maloel
maloel merged commit 19a8926 into realsenseai:development Oct 16, 2023
@maloel
maloel deleted the device-list branch October 16, 2023 18:38
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