Fix @param names in synchronized_value - #420
Open
karpovantonme wants to merge 1 commit into
Open
Conversation
Two things in one file. The lock pointer constructors spell the first parameter val, while every comment above them says value. The name is not consistent in the file itself: unique_lock_ptr takes value in the three tag constructors and val in the plain one, so the comments happen to be right in half the cases and wrong in the other half. Comments now follow the code in each place. The third argument of the tag constructors has no name, and Doxygen cannot attach a @param to an unnamed parameter. Naming it would go against the style of the file, so those lines became @note instead.
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.
Thirteen
@paramtags insynchronized_value.hppthat do not match the parameters below them. Documentation only, no code touched.The first parameter is called
val, the comments sayvalueSame in
strict_lock_ptr,const_unique_lock_ptrandunique_lock_ptr.Worth noting because it makes the fix less obvious than it looks: the name is not consistent in the file itself.
unique_lock_ptrtakesvaluein its three tag constructors andvalin the plain one, so the comments are already correct in some places and wrong in others. I changed only the ones where the code saysvaland left the rest alone.The other way round would work too: rename the parameters to
valueeverywhere and leave every comment as it is. That touches declarations rather than comments, so I did not want to decide it on your behalf. Say the word and I will send that version instead.@param tagon an unnamed parameterThe third argument has no name, and Doxygen cannot attach a
@paramto one. Naming it would go against the rest of the file, where every tag argument is unnamed, so those six lines became@noteand say the same thing.Both kinds are what
clang -Wdocumentationreports asparameter '...' not found in the function declaration.