STYLE: foamHelp helpType clean-up

This commit is contained in:
andy
2012-08-16 15:46:49 +01:00
parent 20d9399d7f
commit 48cf4e6715

View File

@ -71,8 +71,11 @@ void Foam::helpType::displayDocOptions
{
fileName doxyPath(doxygenPath());
if (!doxyPath.empty())
if (doxyPath.empty())
{
return;
}
Info<< "Found doxygen help in " << doxyPath.c_str() << nl << endl;
doxygenXmlParser parser
@ -85,7 +88,6 @@ void Foam::helpType::displayDocOptions
Info<< "Valid types include:" << nl << SortableList<word>(parser.toc());
}
}
void Foam::helpType::displayDoc
@ -97,8 +99,11 @@ void Foam::helpType::displayDoc
{
fileName doxyPath(doxygenPath());
if (!doxyPath.empty())
if (doxyPath.empty())
{
return;
}
Info<< "Found doxygen help in " << doxyPath.c_str() << nl << endl;
string docBrowser = getEnv("FOAM_DOC_BROWSER");
@ -124,10 +129,7 @@ void Foam::helpType::displayDoc
if (parser.found(className))
{
fileName docFile
(
doxyPath/parser.subDict(className).lookup("filename")
);
fileName docFile(doxyPath/parser.subDict(className).lookup("filename"));
// can use FOAM_DOC_BROWSER='application file://%f' if required
docBrowser.replaceAll("%f", docFile);
@ -149,12 +151,10 @@ void Foam::helpType::displayDoc
"void Foam::helpType::displayDoc(const word, const string)"
)
<< "No help for type " << className << " found."
<< " Valid options include:"
<< SortableList<word>(parser.toc())
<< " Valid options include:" << SortableList<word>(parser.toc())
<< exit(FatalError);
}
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //