Repository navigation
Options registry for non-built-in DDS options - #12163
Merged
Merged
Conversation
(cherry picked from commit 7ec4461)
OhadMeir
reviewed
Sep 4, 2023
Nir-Az
reviewed
Sep 4, 2023
OhadMeir
reviewed
Sep 4, 2023
|
|
||
| inline rs2_option index_to_option( size_t index ) | ||
| { | ||
| return rs2_option( -( int( index ) + 1 ) ); |
Contributor
There was a problem hiding this comment.
Consider checking if index >= INT_MAX.
Collaborator
There was a problem hiding this comment.
I must say this function is not readable.
I asked Remi to look and he also didn't understand.
Why all the values are negative?
@maloel please add some comments
Contributor
Author
There was a problem hiding this comment.
Added:
// Index = index into the _name_by_index array -> 0-based
// Registered rs2_option value will be negative, and starting at -1:
Will be in next PR
OhadMeir
reviewed
Sep 4, 2023
OhadMeir
reviewed
Sep 4, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New options can now be registered by their name/string:
rs2_option_from_string, the reverse ofrs2_option_to_stringVarious other minor changes along the way. I recommend to just review by commit...
Tracked by [LRS-864]