]> git.lyx.org Git - features.git/commitdiff
Fix an instance of -Werror=misleading-indentation
authorScott Kostyshak <skostysh@lyx.org>
Thu, 18 Feb 2021 03:56:13 +0000 (22:56 -0500)
committerScott Kostyshak <skostysh@lyx.org>
Thu, 18 Feb 2021 04:01:54 +0000 (23:01 -0500)
Full GCC output is:

/home/scott/lyxbuilds/master/repo/src/insets/InsetText.cpp: In member function ‘void lyx::InsetText::docbook(lyx::XMLStream&, const lyx::OutputParams&, lyx::InsetText::XHTMLOptions) const’:
/home/scott/lyxbuilds/master/repo/src/insets/InsetText.cpp:713:5: error: this ‘for’ clause does not guard... [-Werror=misleading-indentation]
  713 |     for (auto const & arg : appendedArguments)
      |     ^~~
/home/scott/lyxbuilds/master/repo/src/insets/InsetText.cpp:717:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
  717 |  if (writeOuterTag) {
      |  ^~

src/insets/InsetText.cpp

index 79425887bea84b0fc9c50f251988eec8f37dc57e..fa1f40c7afa14a9a18d9556cb6ce7fee138906c2 100644 (file)
@@ -709,9 +709,9 @@ void InsetText::docbook(XMLStream & xs, OutputParams const & rp, XHTMLOptions op
        docbookParagraphs(text_, buffer(), xs, runparams);
        xs.endDivision();
 
-    // - Think about the arguments after the paragraph.
-    for (auto const & arg : appendedArguments)
-        arg->docbook(xs, np);
+       // - Think about the arguments after the paragraph.
+       for (auto const & arg : appendedArguments)
+               arg->docbook(xs, np);
 
        // - Close the required tags.
        if (writeOuterTag) {