[doc] Fix \tparam names that do not match the declaration - #1486
Open
karpovantonme wants to merge 2 commits into
Open
[doc] Fix \tparam names that do not match the declaration#1486karpovantonme wants to merge 2 commits into
karpovantonme wants to merge 2 commits into
Conversation
Every projection class in srs/projections/proj is `template <typename T, typename Parameters>`, but the Doxygen block above each one still documents `Geographic` and `Cartesian`, the parameters these classes took before ddce41f (Apr 2017) moved the internal representations. `T` has been undocumented since. All 152 blocks in 99 headers were byte-identical and every one is followed by `template <typename T, typename Parameters>`, so this is a straight replacement. The wording for `T` is taken from srs/projections/impl/base_dynamic.hpp, which already documents the same type as "calculation type". Comments only.
- clip_linestring.hpp: the Liang-Barsky strategy documents \tparam B and \tparam P, the template takes Box and Point. - simplify.hpp: douglas_peucker_point writes '\tparam the enclosed point type', so Doxygen reads 'the' as the parameter name. It is Point. - azimuth.hpp: default_strategy documents CalculationType, the template has only CSTag. - transform.hpp: the four lines read '\tparam CoordinateSystemTag 1,2 coordinate system tags', meaning both at once, so Doxygen sees a name that does not exist. Split into the eight real parameters. Source and target follow from transform(Geometry1 const&, Geometry2&), where the second one is the mutable output. Comments only.
Collaborator
|
Thanks! I think this include the other PR #1485 |
Author
|
Yes, this one includes 1485 -- I diffed them, all 251 added lines of 1485 are in here, plus 11 more Closing 1485 now, so this is the only one to review |
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.
Four Doxygen blocks name a template parameter the declaration below them does not have.
algorithms/detail/overlay/clip_linestring.hpp:43B,PBox,Pointalgorithms/simplify.hpp:82thePointstrategies/azimuth.hpp:27CalculationTypeCSTagexistsstrategies/transform.hpp:41CoordinateSystemTag,CoordinateSystem,D,PointTwo of these are interesting beyond a rename.
simplify.hppreads\tparam the enclosed point type, with the name left out, so Doxygen takestheas the parameter name and the description becomes "enclosed point type" attached to a parameter that does not exist.transform.hppdocuments pairs in one line each:The intent is clear to a human and invisible to Doxygen, which reads four names none of which exist, and leaves all eight real parameters undocumented. Split into eight lines.
Which one is source and which is target is not a guess:
transform(Geometry1 const& geometry1, Geometry2& geometry2)takes the first by const reference and the second mutable, andselect_strategypassesGeometry1's traits into the odd positions.azimuth.hppsimply lists one parameter too many, so that line is gone.Not included
The same sweep flags twelve more, and they are a different kind: the block documents parameters that belong to a member function rather than to the class, e.g.
detail/not.hppdocumentsGeometry1/Geometry2fromapplyon a class templated only onPolicy, and the pythagoras distance strategies do the same withPoint1/Point2. Fixing those means deciding where the documentation should live, which is yours to make rather than mine. Point at any of them and I will send a follow-up.Checks
Comments only, no declaration touched. The check reported 24 before and 16 after, and the sixteen left are exactly the group described above.
Found with a small tool that pulls every
\paramand\tparamname out of a Doxygen block and compares it against the declaration that follows, then re-run afterwards to confirm the count moved by exactly the number of edits.