Skip to content

Fix two \param names that refer to the member, not the argument - #4594

Merged
stweil merged 1 commit into
tesseract-ocr:mainfrom
darkdi:fix/doxygen-param-case
Aug 13, 2026
Merged

stweil merged 1 commit into
tesseract-ocr:mainfrom
darkdi:fix/doxygen-param-case

Conversation

@darkdi

@darkdi darkdi commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Two \param tags name the member the argument is assigned to, rather than the argument:

/// @param NumFeatures maximum # of features to be put in feature set
FEATURE_SET_STRUCT(int numFeatures) : NumFeatures(0), MaxNumFeatures(numFeatures), ...
/// @param Label label for new list
LABELEDLISTNODE(const char *label) : Label(label) { }
std::string Label;

In both cases NumFeatures and Label are the struct fields; the constructor arguments are numFeatures and label. Doxygen matches \param by name, so it documents a parameter that does not exist and the real one is left undescribed.

Changed the two tags to the argument names. Comments only — no signature, initialiser, or behaviour is touched.

Found with a static checker comparing \param names against the declaration below them; both were read by hand against the constructor before changing.

Both constructors document the field the argument is stored into rather
than the argument itself, so Doxygen renders a parameter that does not
exist and leaves the real one undocumented.

Comments only.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@stweil stweil left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you!

@stweil
stweil merged commit f71f14e into tesseract-ocr:main Aug 13, 2026
1 check passed
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