Apply re-formatting to C++ in src/ tree.
[alexxy/gromacs.git] / src / gromacs / commandline / cmdlinehelpmodule.cpp
index 95b4acfa61fe15c5591075a849b0f77e7338b12c..029b90a680da32efe700a1e4a690481236a44306 100644 (file)
@@ -528,7 +528,8 @@ HelpExportReStructuredText::HelpExportReStructuredText(const CommandLineHelpModu
     while (linksFile.readLine(&line))
     {
         links_.addLink("[REF]." + line + "[ref]",
-                       formatString(":ref:`.%s <%s>`", line.c_str(), line.c_str()), line);
+                       formatString(":ref:`.%s <%s>`", line.c_str(), line.c_str()),
+                       line);
         links_.addLink("[REF]" + line + "[ref]", formatString(":ref:`%s`", line.c_str()), line);
     }
     linksFile.close();
@@ -539,8 +540,8 @@ void HelpExportReStructuredText::startModuleExport()
 {
     indexFile_ = std::make_unique<TextWriter>(
             outputRedirector_->openTextOutputFile("fragments/byname.rst"));
-    indexFile_->writeLine(formatString("* :doc:`%s </onlinehelp/%s>` - %s", binaryName_.c_str(),
-                                       binaryName_.c_str(), RootHelpText::title));
+    indexFile_->writeLine(formatString(
+            "* :doc:`%s </onlinehelp/%s>` - %s", binaryName_.c_str(), binaryName_.c_str(), RootHelpText::title));
     manPagesFile_ =
             std::make_unique<TextWriter>(outputRedirector_->openTextOutputFile("conf-man.py"));
     manPagesFile_->writeLine("man_pages = [");
@@ -579,10 +580,12 @@ void HelpExportReStructuredText::exportModuleHelp(const ICommandLineModule& modu
             "   More information about |Gromacs| is available at <http://www.gromacs.org/>.");
     file->close();
 
-    indexFile_->writeLine(formatString("* :doc:`%s </onlinehelp/%s>` - %s", displayName.c_str(),
-                                       tag.c_str(), module.shortDescription()));
+    indexFile_->writeLine(formatString(
+            "* :doc:`%s </onlinehelp/%s>` - %s", displayName.c_str(), tag.c_str(), module.shortDescription()));
     manPagesFile_->writeLine(formatString("    ('onlinehelp/%s', '%s', \"%s\", '', 1),",
-                                          tag.c_str(), tag.c_str(), module.shortDescription()));
+                                          tag.c_str(),
+                                          tag.c_str(),
+                                          module.shortDescription()));
 }
 
 void HelpExportReStructuredText::finishModuleExport()
@@ -591,7 +594,9 @@ void HelpExportReStructuredText::finishModuleExport()
     indexFile_.reset();
     // TODO: Generalize.
     manPagesFile_->writeLine(formatString("    ('onlinehelp/%s', '%s', '%s', '', 1)",
-                                          binaryName_.c_str(), binaryName_.c_str(), RootHelpText::title));
+                                          binaryName_.c_str(),
+                                          binaryName_.c_str(),
+                                          RootHelpText::title));
     manPagesFile_->writeLine("]");
     manPagesFile_->close();
     manPagesFile_.reset();
@@ -625,8 +630,8 @@ void HelpExportReStructuredText::exportModuleGroup(const char* title, const Modu
         GMX_RELEASE_ASSERT(dashPos != std::string::npos,
                            "There should always be at least one dash in the tag");
         displayName[dashPos] = ' ';
-        indexFile_->writeLine(formatString(":doc:`%s </onlinehelp/%s>`\n  %s", displayName.c_str(),
-                                           tag.c_str(), module->second));
+        indexFile_->writeLine(formatString(
+                ":doc:`%s </onlinehelp/%s>`\n  %s", displayName.c_str(), tag.c_str(), module->second));
         manPagesFile_->writeLine(formatString(":manpage:`%s(1)`\n  %s", tag.c_str(), module->second));
     }
 }