don't put closing parenthesis on its own line
Anthony Foiani <[email protected]> Tue, 26 Feb 2013 00:32:09 -0700
| Newsgroups | gmane.text.doxygen.devel |
|---|---|
| Message-ID | <CAOhNY-_0yfqqc+Tn5fzWAiyyjo8TVN+ox4ODDa1wC5xwmnVCWg@mail.gmail.com> |
Greetings.
I don't know if it is intentional or not, but I found that the current
Doxygen output for multiple (2-or-more) argument functions to be
sub-optimal. It wants to render it like so:
retType
myFunction( Type1 arg1,
Type2 arg2
)
In case that formatting gets mangled, you can see the difference in
this sample page, pointed out by PovAddict:
http://www.stack.nl/~dimitri/doxygen/manual/examples/overload/html/class_test.html
or: http://preview.tinyurl.com/avovthd
I don't see any reason for this extra space, not even "const" or
similar. After all, 0- and 1-arity functions don't get the extra
space.
And I personally dislike the aesthetic, although I can appreciate that
this is less clear-cut, and that others might have other opinions.
(As PovAddict said on IRC: "for something like this, you'll get
bikeshedding no matter where you post it"...)
Anyway, I cooked up a small patch to get rid of the extra space. As a
bonus, it is a net removal of lines of code. Please feel free to
incorporate or discard.
Thanks, either way, for a fantastic tool.
Best regards,
Anthony Foiani
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Doxygen-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/doxygen-develop
closing-paren-same-line.patch
(application/octet-stream, 882 B)
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index f19f5d6..544dc6e 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -2386,23 +2386,9 @@ void HtmlGenerator::endParameterName(bool last,bool emptyList,bool closeBracket)
DBG_HTML(t << "<!-- endParameterName -->" << endl;)
if (last)
{
- if (emptyList)
- {
- if (closeBracket) t << "</td><td>)";
- t << "</td>" << endl;
- t << " <td>";
- }
- else
- {
- t << " </td>" << endl;
- t << " </tr>" << endl;
- t << " <tr>" << endl;
- t << " <td></td>" << endl;
- t << " <td>";
- if (closeBracket) t << ")";
- t << "</td>" << endl;
- t << " <td></td><td>";
- }
+ t << " </td>" << endl;
+ if (closeBracket) t << " <td>)</td>" << endl;
+ t << " <td>";
}
else
{