Get rid of else after break/continue/return.

Change-Id: I3efc57cd7325d16e3ca8ebdeeaec06012b2c56e3
Reviewed-on: https://pdfium-review.googlesource.com/20110
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfapi/edit/cpdf_creator.cpp b/core/fpdfapi/edit/cpdf_creator.cpp
index db5bd68..e31da13 100644
--- a/core/fpdfapi/edit/cpdf_creator.cpp
+++ b/core/fpdfapi/edit/cpdf_creator.cpp
@@ -184,10 +184,7 @@
     return false;
   }
 
-  if (!m_Archive->WriteString("\r\nendstream"))
-    return false;
-
-  return true;
+  return m_Archive->WriteString("\r\nendstream");
 }
 
 bool CPDF_Creator::WriteIndirectObj(uint32_t objnum, const CPDF_Object* pObj) {
diff --git a/core/fpdfapi/page/cpdf_streamparser.cpp b/core/fpdfapi/page/cpdf_streamparser.cpp
index aa1d227..2c7e025 100644
--- a/core/fpdfapi/page/cpdf_streamparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamparser.cpp
@@ -499,7 +499,13 @@
           status = 2;
           break;
         }
-        if (ch == 'n') {
+        if (ch == '\r') {
+          status = 4;
+          break;
+        }
+        if (ch == '\n') {
+          // Do nothing.
+        } else if (ch == 'n') {
           buf << '\n';
         } else if (ch == 'r') {
           buf << '\r';
@@ -509,10 +515,6 @@
           buf << '\b';
         } else if (ch == 'f') {
           buf << '\f';
-        } else if (ch == '\r') {
-          status = 4;
-          break;
-        } else if (ch == '\n') {
         } else {
           buf << static_cast<char>(ch);
         }
diff --git a/core/fpdfapi/parser/cpdf_parser.cpp b/core/fpdfapi/parser/cpdf_parser.cpp
index 5b57b94..4e77773 100644
--- a/core/fpdfapi/parser/cpdf_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_parser.cpp
@@ -394,9 +394,8 @@
       // If the object number read doesn't match the one stored,
       // something is wrong with the cross reference table.
       return false;
-    } else {
-      return true;
     }
+    return true;
   }
   return true;
 }
diff --git a/core/fpdfapi/parser/cpdf_syntax_parser.cpp b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
index ddf420b..66ce183 100644
--- a/core/fpdfapi/parser/cpdf_syntax_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_syntax_parser.cpp
@@ -208,6 +208,10 @@
           break;
         }
 
+        if (ch == '\r') {
+          status = ReadStatus::CarriageReturn;
+          break;
+        }
         if (ch == 'n') {
           buf << '\n';
         } else if (ch == 'r') {
@@ -218,9 +222,6 @@
           buf << '\b';
         } else if (ch == 'f') {
           buf << '\f';
-        } else if (ch == '\r') {
-          status = ReadStatus::CarriageReturn;
-          break;
         } else if (ch != '\n') {
           buf << static_cast<char>(ch);
         }
diff --git a/core/fpdfapi/parser/fpdf_parser_decode.cpp b/core/fpdfapi/parser/fpdf_parser_decode.cpp
index 9532b82..3a8660f 100644
--- a/core/fpdfapi/parser/fpdf_parser_decode.cpp
+++ b/core/fpdfapi/parser/fpdf_parser_decode.cpp
@@ -361,6 +361,8 @@
     uint8_t* new_buf = nullptr;
     uint32_t new_size = 0xFFFFFFFF;
     int offset = -1;
+    if (decoder == "Crypt")
+      continue;
     if (decoder == "FlateDecode" || decoder == "Fl") {
       if (bImageAcc && i == nSize - 1) {
         *ImageEncoding = "FlateDecode";
@@ -387,8 +389,6 @@
         return true;
       }
       offset = RunLengthDecode(last_buf, last_size, &new_buf, &new_size);
-    } else if (decoder == "Crypt") {
-      continue;
     } else {
       // If we get here, assume it's an image decoder.
       if (decoder == "DCT")
diff --git a/core/fpdfdoc/cpdf_variabletext.cpp b/core/fpdfdoc/cpdf_variabletext.cpp
index 18aa957..82a8d67 100644
--- a/core/fpdfdoc/cpdf_variabletext.cpp
+++ b/core/fpdfdoc/cpdf_variabletext.cpp
@@ -897,15 +897,11 @@
   int32_t nRight = nTotal - 1;
   int32_t nMid = nTotal / 2;
   while (nLeft <= nRight) {
-    if (IsBigger(gFontSizeSteps[nMid])) {
+    if (IsBigger(gFontSizeSteps[nMid]))
       nRight = nMid - 1;
-      nMid = (nLeft + nRight) / 2;
-      continue;
-    } else {
+    else
       nLeft = nMid + 1;
-      nMid = (nLeft + nRight) / 2;
-      continue;
-    }
+    nMid = (nLeft + nRight) / 2;
   }
   return (float)gFontSizeSteps[nMid];
 }
diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp
index 8ef5522..98eacf3 100644
--- a/core/fpdftext/cpdf_textpage.cpp
+++ b/core/fpdftext/cpdf_textpage.cpp
@@ -1127,41 +1127,39 @@
       m_TempCharList.push_back(charinfo);
       m_TempTextBuf.AppendChar(0xfffe);
       continue;
-    } else {
-      int nTotal = wstrItem.GetLength();
-      bool bDel = false;
-      const int count =
-          std::min(pdfium::CollectionSize<int>(m_TempCharList), 7);
-      float threshold = charinfo.m_Matrix.TransformXDistance(
-          (float)TEXT_CHARRATIO_GAPDELTA * pTextObj->GetFontSize());
-      for (int n = pdfium::CollectionSize<int>(m_TempCharList);
-           n > pdfium::CollectionSize<int>(m_TempCharList) - count; n--) {
-        const PAGECHAR_INFO& charinfo1 = m_TempCharList[n - 1];
-        CFX_PointF diff = charinfo1.m_Origin - charinfo.m_Origin;
-        if (charinfo1.m_CharCode == charinfo.m_CharCode &&
-            charinfo1.m_pTextObj->GetFont() == charinfo.m_pTextObj->GetFont() &&
-            fabs(diff.x) < threshold && fabs(diff.y) < threshold) {
-          bDel = true;
-          break;
-        }
+    }
+    int nTotal = wstrItem.GetLength();
+    bool bDel = false;
+    const int count = std::min(pdfium::CollectionSize<int>(m_TempCharList), 7);
+    float threshold = charinfo.m_Matrix.TransformXDistance(
+        (float)TEXT_CHARRATIO_GAPDELTA * pTextObj->GetFontSize());
+    for (int n = pdfium::CollectionSize<int>(m_TempCharList);
+         n > pdfium::CollectionSize<int>(m_TempCharList) - count; n--) {
+      const PAGECHAR_INFO& charinfo1 = m_TempCharList[n - 1];
+      CFX_PointF diff = charinfo1.m_Origin - charinfo.m_Origin;
+      if (charinfo1.m_CharCode == charinfo.m_CharCode &&
+          charinfo1.m_pTextObj->GetFont() == charinfo.m_pTextObj->GetFont() &&
+          fabs(diff.x) < threshold && fabs(diff.y) < threshold) {
+        bDel = true;
+        break;
       }
-      if (!bDel) {
-        for (int nIndex = 0; nIndex < nTotal; nIndex++) {
-          charinfo.m_Unicode = wstrItem[nIndex];
-          if (charinfo.m_Unicode) {
-            charinfo.m_Index = m_TextBuf.GetLength();
-            m_TempTextBuf.AppendChar(charinfo.m_Unicode);
-          } else {
-            m_TempTextBuf.AppendChar(0xfffe);
-          }
-          m_TempCharList.push_back(charinfo);
+    }
+    if (!bDel) {
+      for (int nIndex = 0; nIndex < nTotal; nIndex++) {
+        charinfo.m_Unicode = wstrItem[nIndex];
+        if (charinfo.m_Unicode) {
+          charinfo.m_Index = m_TextBuf.GetLength();
+          m_TempTextBuf.AppendChar(charinfo.m_Unicode);
+        } else {
+          m_TempTextBuf.AppendChar(0xfffe);
         }
-      } else if (i == 0) {
-        WideString str = m_TempTextBuf.MakeString();
-        if (!str.IsEmpty() && str[str.GetLength() - 1] == TEXT_SPACE_CHAR) {
-          m_TempTextBuf.Delete(m_TempTextBuf.GetLength() - 1, 1);
-          m_TempCharList.pop_back();
-        }
+        m_TempCharList.push_back(charinfo);
+      }
+    } else if (i == 0) {
+      WideString str = m_TempTextBuf.MakeString();
+      if (!str.IsEmpty() && str[str.GetLength() - 1] == TEXT_SPACE_CHAR) {
+        m_TempTextBuf.Delete(m_TempTextBuf.GetLength() - 1, 1);
+        m_TempCharList.pop_back();
       }
     }
   }
diff --git a/core/fpdftext/cpdf_textpagefind.cpp b/core/fpdftext/cpdf_textpagefind.cpp
index 9f243a0..97aa34f 100644
--- a/core/fpdftext/cpdf_textpagefind.cpp
+++ b/core/fpdftext/cpdf_textpagefind.cpp
@@ -283,13 +283,12 @@
     int ret =
         ExtractSubString(csWord, findwhat.c_str(), index, TEXT_SPACE_CHAR);
     if (csWord.IsEmpty()) {
-      if (ret) {
-        m_csFindWhatArray.push_back(L"");
-        index++;
-        continue;
-      } else {
+      if (!ret)
         break;
-      }
+
+      m_csFindWhatArray.push_back(L"");
+      index++;
+      continue;
     }
     size_t pos = 0;
     while (pos < csWord.GetLength()) {
diff --git a/core/fxcodec/codec/fx_codec_flate.cpp b/core/fxcodec/codec/fx_codec_flate.cpp
index 5b1df38..95902bb 100644
--- a/core/fxcodec/codec/fx_codec_flate.cpp
+++ b/core/fxcodec/codec/fx_codec_flate.cpp
@@ -190,6 +190,8 @@
       }
     }
     m_InPos += m_CodeLen;
+    if (code == 257)
+      break;
     if (code < 256) {
       if (m_OutPos == dest_size) {
         return -5;
@@ -206,9 +208,8 @@
       m_CodeLen = 9;
       m_nCodes = 0;
       old_code = 0xFFFFFFFF;
-    } else if (code == 257) {
-      break;
     } else {
+      // Else 257 or greater.
       if (old_code == 0xFFFFFFFF)
         return 2;
 
diff --git a/core/fxcodec/jbig2/JBig2_SddProc.cpp b/core/fxcodec/jbig2/JBig2_SddProc.cpp
index 43768bd..ee0c0f3 100644
--- a/core/fxcodec/jbig2/JBig2_SddProc.cpp
+++ b/core/fxcodec/jbig2/JBig2_SddProc.cpp
@@ -310,25 +310,23 @@
     HCFIRSTSYM = NSYMSDECODED;
     for (;;) {
       nVal = pHuffmanDecoder->decodeAValue(SDHUFFDW, &DW);
-      if (nVal == JBIG2_OOB) {
+      if (nVal == JBIG2_OOB)
         break;
-      } else if (nVal != 0) {
+      if (nVal != 0)
         return nullptr;
-      } else {
-        if (NSYMSDECODED >= SDNUMNEWSYMS)
-          return nullptr;
+      if (NSYMSDECODED >= SDNUMNEWSYMS)
+        return nullptr;
 
-        SYMWIDTH = SYMWIDTH + DW;
-        if ((int)SYMWIDTH < 0 || (int)SYMWIDTH > JBIG2_MAX_IMAGE_SIZE) {
-          return nullptr;
-        } else if (HCHEIGHT == 0 || SYMWIDTH == 0) {
-          TOTWIDTH = TOTWIDTH + SYMWIDTH;
-          SDNEWSYMS[NSYMSDECODED] = nullptr;
-          NSYMSDECODED = NSYMSDECODED + 1;
-          continue;
-        }
+      SYMWIDTH = SYMWIDTH + DW;
+      if ((int)SYMWIDTH < 0 || (int)SYMWIDTH > JBIG2_MAX_IMAGE_SIZE)
+        return nullptr;
+      if (HCHEIGHT == 0 || SYMWIDTH == 0) {
         TOTWIDTH = TOTWIDTH + SYMWIDTH;
+        SDNEWSYMS[NSYMSDECODED] = nullptr;
+        NSYMSDECODED = NSYMSDECODED + 1;
+        continue;
       }
+      TOTWIDTH = TOTWIDTH + SYMWIDTH;
       if (SDREFAGG == 1) {
         if (pHuffmanDecoder->decodeAValue(SDHUFFAGGINST, (int*)&REFAGGNINST) !=
             0) {
diff --git a/core/fxcrt/xml/cfx_xmlnode.cpp b/core/fxcrt/xml/cfx_xmlnode.cpp
index f2b9006..601999c 100644
--- a/core/fxcrt/xml/cfx_xmlnode.cpp
+++ b/core/fxcrt/xml/cfx_xmlnode.cpp
@@ -90,11 +90,9 @@
   wchar_t ch;
   while (pStart < pEnd) {
     ch = *pStart++;
-    if (ch == L'/') {
+    if (ch == L'/')
       break;
-    } else {
-      csPath += ch;
-    }
+    csPath += ch;
   }
   iLength -= pStart - pPath;
   CFX_XMLNode* pFind = nullptr;
diff --git a/core/fxcrt/xml/cfx_xmlparser.cpp b/core/fxcrt/xml/cfx_xmlparser.cpp
index a8bb2c9..0f08b06 100644
--- a/core/fxcrt/xml/cfx_xmlparser.cpp
+++ b/core/fxcrt/xml/cfx_xmlparser.cpp
@@ -72,7 +72,8 @@
         if (m_NodeStack.empty()) {
           m_syntaxParserResult = FX_XmlSyntaxResult::Error;
           break;
-        } else if (m_dwCurrentCheckStatus != 0 && m_NodeStack.size() == 2) {
+        }
+        if (m_dwCurrentCheckStatus != 0 && m_NodeStack.size() == 2) {
           m_nSize[m_dwCurrentCheckStatus - 1] =
               m_pParser->GetCurrentBinaryPos() -
               m_nStart[m_dwCurrentCheckStatus - 1];
diff --git a/core/fxcrt/xml/cfx_xmlsyntaxparser.cpp b/core/fxcrt/xml/cfx_xmlsyntaxparser.cpp
index d72e7af..c0cc1a6 100644
--- a/core/fxcrt/xml/cfx_xmlsyntaxparser.cpp
+++ b/core/fxcrt/xml/cfx_xmlsyntaxparser.cpp
@@ -535,7 +535,8 @@
             if (m_BlockBuffer.IsEmpty()) {
               m_Start++;
               break;
-            } else if (m_wQuotationMark == 0) {
+            }
+            if (m_wQuotationMark == 0) {
               m_iTextDataLength = m_BlockBuffer.GetDataLength();
               m_wQuotationMark = 0;
               m_BlockBuffer.Reset(true);
diff --git a/fxbarcode/oned/BC_OnedCode39Writer.cpp b/fxbarcode/oned/BC_OnedCode39Writer.cpp
index 8adef14..4f25eb1 100644
--- a/fxbarcode/oned/BC_OnedCode39Writer.cpp
+++ b/fxbarcode/oned/BC_OnedCode39Writer.cpp
@@ -72,9 +72,8 @@
     if (ch > 175) {
       i++;
       continue;
-    } else {
-      ch = Upper(ch);
     }
+    ch = Upper(ch);
     if ((ch >= L'0' && ch <= L'9') || (ch >= L'A' && ch <= L'Z') ||
         ch == L'-' || ch == L'.' || ch == L' ' || ch == L'*' || ch == L'$' ||
         ch == L'/' || ch == L'+' || ch == L'%') {
diff --git a/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp b/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp
index 1450b37..059287a 100644
--- a/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp
+++ b/fxbarcode/pdf417/BC_PDF417HighLevelEncoder.cpp
@@ -157,26 +157,24 @@
     switch (submode) {
       case SUBMODE_ALPHA:
         if (isAlphaUpper(ch)) {
-          if (ch == ' ') {
+          if (ch == ' ')
             tmp += (wchar_t)26;
-          } else {
+          else
             tmp += (wchar_t)(ch - 65);
-          }
-        } else {
-          if (isAlphaLower(ch)) {
-            submode = SUBMODE_LOWER;
-            tmp += (wchar_t)27;
-            continue;
-          } else if (isMixed(ch)) {
-            submode = SUBMODE_MIXED;
-            tmp += (wchar_t)28;
-            continue;
-          } else {
-            tmp += (wchar_t)29;
-            tmp += PUNCTUATION[ch];
-            break;
-          }
+          break;
         }
+        if (isAlphaLower(ch)) {
+          submode = SUBMODE_LOWER;
+          tmp += (wchar_t)27;
+          continue;
+        }
+        if (isMixed(ch)) {
+          submode = SUBMODE_MIXED;
+          tmp += (wchar_t)28;
+          continue;
+        }
+        tmp += (wchar_t)29;
+        tmp += PUNCTUATION[ch];
         break;
       case SUBMODE_LOWER:
         if (isAlphaLower(ch)) {
@@ -185,56 +183,56 @@
           } else {
             tmp += (wchar_t)(ch - 97);
           }
-        } else {
-          if (isAlphaUpper(ch)) {
-            tmp += (wchar_t)27;
-            tmp += (wchar_t)(ch - 65);
-            break;
-          } else if (isMixed(ch)) {
-            submode = SUBMODE_MIXED;
-            tmp += (wchar_t)28;
-            continue;
-          } else {
-            tmp += (wchar_t)29;
-            tmp += PUNCTUATION[ch];
-            break;
-          }
+          break;
         }
+        if (isAlphaUpper(ch)) {
+          tmp += (wchar_t)27;
+          tmp += (wchar_t)(ch - 65);
+          break;
+        }
+        if (isMixed(ch)) {
+          submode = SUBMODE_MIXED;
+          tmp += (wchar_t)28;
+          continue;
+        }
+
+        tmp += (wchar_t)29;
+        tmp += PUNCTUATION[ch];
         break;
       case SUBMODE_MIXED:
         if (isMixed(ch)) {
           tmp += MIXED[ch];
-        } else {
-          if (isAlphaUpper(ch)) {
-            submode = SUBMODE_ALPHA;
-            tmp += (wchar_t)28;
+          break;
+        }
+        if (isAlphaUpper(ch)) {
+          submode = SUBMODE_ALPHA;
+          tmp += (wchar_t)28;
+          continue;
+        }
+        if (isAlphaLower(ch)) {
+          submode = SUBMODE_LOWER;
+          tmp += (wchar_t)27;
+          continue;
+        }
+        if (startpos + idx + 1 < count) {
+          wchar_t next = msg[startpos + idx + 1];
+          if (isPunctuation(next)) {
+            submode = SUBMODE_PUNCTUATION;
+            tmp += (wchar_t)25;
             continue;
-          } else if (isAlphaLower(ch)) {
-            submode = SUBMODE_LOWER;
-            tmp += (wchar_t)27;
-            continue;
-          } else {
-            if (startpos + idx + 1 < count) {
-              wchar_t next = msg[startpos + idx + 1];
-              if (isPunctuation(next)) {
-                submode = SUBMODE_PUNCTUATION;
-                tmp += (wchar_t)25;
-                continue;
-              }
-            }
-            tmp += (wchar_t)29;
-            tmp += PUNCTUATION[ch];
           }
         }
+        tmp += (wchar_t)29;
+        tmp += PUNCTUATION[ch];
         break;
       default:
         if (isPunctuation(ch)) {
           tmp += PUNCTUATION[ch];
-        } else {
-          submode = SUBMODE_ALPHA;
-          tmp += (wchar_t)29;
-          continue;
+          break;
         }
+        submode = SUBMODE_ALPHA;
+        tmp += (wchar_t)29;
+        continue;
     }
     idx++;
     if (idx >= count) {
diff --git a/fxjs/cfxjse_resolveprocessor.cpp b/fxjs/cfxjse_resolveprocessor.cpp
index ef0fcbf..5dba39b 100644
--- a/fxjs/cfxjse_resolveprocessor.cpp
+++ b/fxjs/cfxjse_resolveprocessor.cpp
@@ -584,6 +584,7 @@
       static_cast<XFA_HashCode>(FX_HashCode_GetW(wsName.AsStringView(), false));
   return nStart;
 }
+
 void CFXJSE_ResolveProcessor::ConditionArray(int32_t iCurIndex,
                                              WideString wsCondition,
                                              int32_t iFoundCount,
@@ -594,18 +595,14 @@
   int32_t i = 1;
   for (; i < iLen; ++i) {
     wchar_t ch = wsCondition[i];
-    if (ch == ' ') {
+    if (ch == ' ')
       continue;
-    }
     if (ch == '+' || ch == '-') {
       bRelative = true;
-      break;
     } else if (ch == '*') {
       bAll = true;
-      break;
-    } else {
-      break;
     }
+    break;
   }
   if (bAll) {
     if (rnd.m_dwStyles & XFA_RESOLVENODE_CreateNode) {
diff --git a/xfa/fgas/crt/cfgas_formatstring.cpp b/xfa/fgas/crt/cfgas_formatstring.cpp
index eaac969..b8f6eee 100644
--- a/xfa/fgas/crt/cfgas_formatstring.cpp
+++ b/xfa/fgas/crt/cfgas_formatstring.cpp
@@ -246,7 +246,8 @@
       *cc += iLiteralLen;
       ccf++;
       continue;
-    } else if (!wsDateSymbols.Contains(strf[ccf])) {
+    }
+    if (!wsDateSymbols.Contains(strf[ccf])) {
       if (strf[ccf] != str[*cc])
         return false;
       (*cc)++;
@@ -885,6 +886,16 @@
       }
 
       uint32_t dwHash = FX_HashCode_GetW(wsCategory.AsStringView(), false);
+      if (dwHash == FX_LOCALECATEGORY_DateTimeHash)
+        return FX_LOCALECATEGORY_DateTime;
+      if (dwHash == FX_LOCALECATEGORY_TextHash)
+        return FX_LOCALECATEGORY_Text;
+      if (dwHash == FX_LOCALECATEGORY_NumHash)
+        return FX_LOCALECATEGORY_Num;
+      if (dwHash == FX_LOCALECATEGORY_ZeroHash)
+        return FX_LOCALECATEGORY_Zero;
+      if (dwHash == FX_LOCALECATEGORY_NullHash)
+        return FX_LOCALECATEGORY_Null;
       if (dwHash == FX_LOCALECATEGORY_DateHash) {
         if (eCategory == FX_LOCALECATEGORY_Time)
           return FX_LOCALECATEGORY_DateTime;
@@ -893,16 +904,6 @@
         if (eCategory == FX_LOCALECATEGORY_Date)
           return FX_LOCALECATEGORY_DateTime;
         eCategory = FX_LOCALECATEGORY_Time;
-      } else if (dwHash == FX_LOCALECATEGORY_DateTimeHash) {
-        return FX_LOCALECATEGORY_DateTime;
-      } else if (dwHash == FX_LOCALECATEGORY_TextHash) {
-        return FX_LOCALECATEGORY_Text;
-      } else if (dwHash == FX_LOCALECATEGORY_NumHash) {
-        return FX_LOCALECATEGORY_Num;
-      } else if (dwHash == FX_LOCALECATEGORY_ZeroHash) {
-        return FX_LOCALECATEGORY_Zero;
-      } else if (dwHash == FX_LOCALECATEGORY_NullHash) {
-        return FX_LOCALECATEGORY_Null;
       }
     } else if (pStr[ccf] == '}') {
       bBraceOpen = false;
@@ -990,6 +991,10 @@
         continue;
       }
       while (ccf < iLenf) {
+        if (pStr[ccf] == '{') {
+          bBrackOpen = true;
+          break;
+        }
         if (pStr[ccf] == '(') {
           ccf++;
           WideString wsLCID;
@@ -997,9 +1002,6 @@
             wsLCID += pStr[ccf++];
 
           pLocale = m_pLocaleMgr->GetLocaleByName(wsLCID);
-        } else if (pStr[ccf] == '{') {
-          bBrackOpen = true;
-          break;
         } else if (pStr[ccf] == '.') {
           WideString wsSubCategory;
           ccf++;
@@ -1593,6 +1595,10 @@
         continue;
       }
       while (ccf < iLenf) {
+        if (pStr[ccf] == '{') {
+          bBraceOpen = true;
+          break;
+        }
         if (pStr[ccf] == '(') {
           ccf++;
           WideString wsLCID;
@@ -1600,9 +1606,6 @@
             wsLCID += pStr[ccf++];
 
           *pLocale = m_pLocaleMgr->GetLocaleByName(wsLCID);
-        } else if (pStr[ccf] == '{') {
-          bBraceOpen = true;
-          break;
         } else if (pStr[ccf] == '.') {
           WideString wsSubCategory;
           ccf++;
@@ -2314,10 +2317,8 @@
     if (pStrPattern[iPattern] == '\'') {
       *wsOutput += GetLiteralText(pStrPattern, &iPattern, iLenPattern);
       iPattern++;
-      continue;
     } else {
       *wsOutput += pStrPattern[iPattern++];
-      continue;
     }
   }
   return true;
diff --git a/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp b/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp
index cb52c9d..05485d1 100644
--- a/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp
+++ b/xfa/fxfa/parser/cxfa_itemlayoutprocessor.cpp
@@ -2543,8 +2543,7 @@
                             true);
       if (bAddedItemInRow && eFlowStrategy == XFA_AttributeEnum::Tb)
         break;
-      else
-        continue;
+      continue;
     SuspendAndCreateNewRow:
       if (pProcessor)
         m_pCurChildPreprocessor = pProcessor.release();
diff --git a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
index 90e0b15..1e8a773 100644
--- a/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
+++ b/xfa/fxfa/parser/cxfa_layoutpagemgr.cpp
@@ -1261,8 +1261,8 @@
             eCurPagePosition == ePreferredPosition) {
           pPreferredPageArea = pCurrentNode;
           break;
-        } else if (eCurPagePosition == eFallbackPosition &&
-                   !pFallbackPageArea) {
+        }
+        if (eCurPagePosition == eFallbackPosition && !pFallbackPageArea) {
           pFallbackPageArea = pCurrentNode;
         }
       } else if (pTargetPageArea && !MatchPageAreaOddOrEven(pTargetPageArea)) {
diff --git a/xfa/fxfa/parser/cxfa_nodehelper.cpp b/xfa/fxfa/parser/cxfa_nodehelper.cpp
index 6428a3c..f11472a 100644
--- a/xfa/fxfa/parser/cxfa_nodehelper.cpp
+++ b/xfa/fxfa/parser/cxfa_nodehelper.cpp
@@ -267,16 +267,13 @@
 }
 
 bool CXFA_NodeHelper::NodeIsTransparent(CXFA_Node* refNode) {
-  if (!refNode) {
+  if (!refNode)
     return false;
-  }
+
   XFA_Element refNodeType = refNode->GetElementType();
-  if ((refNode->IsUnnamed() && refNode->IsContainerNode()) ||
-      refNodeType == XFA_Element::SubformSet ||
-      refNodeType == XFA_Element::Area || refNodeType == XFA_Element::Proto) {
-    return true;
-  }
-  return false;
+  return (refNode->IsUnnamed() && refNode->IsContainerNode()) ||
+         refNodeType == XFA_Element::SubformSet ||
+         refNodeType == XFA_Element::Area || refNodeType == XFA_Element::Proto;
 }
 
 bool CXFA_NodeHelper::CreateNode_ForCondition(WideString& wsCondition) {
@@ -287,34 +284,29 @@
     m_iCreateFlag = XFA_RESOLVENODE_RSTYPE_CreateNodeOne;
     return false;
   }
-  if (wsCondition[0] == '[') {
-    int32_t i = 1;
-    for (; i < iLen; ++i) {
-      wchar_t ch = wsCondition[i];
-      if (ch == ' ') {
-        continue;
-      }
-      if (ch == '+' || ch == '-') {
-        break;
-      } else if (ch == '*') {
-        bAll = true;
-        break;
-      } else {
-        break;
-      }
-    }
-    if (bAll) {
-      wsIndex = L"1";
-      m_iCreateFlag = XFA_RESOLVENODE_RSTYPE_CreateNodeAll;
-    } else {
-      m_iCreateFlag = XFA_RESOLVENODE_RSTYPE_CreateNodeOne;
-      wsIndex = wsCondition.Mid(i, iLen - 1 - i);
-    }
-    int32_t iIndex = wsIndex.GetInteger();
-    m_iCreateCount = iIndex;
-    return true;
+  if (wsCondition[0] != '[')
+    return false;
+
+  int32_t i = 1;
+  for (; i < iLen; ++i) {
+    wchar_t ch = wsCondition[i];
+    if (ch == ' ')
+      continue;
+
+    if (ch == '*')
+      bAll = true;
+    break;
   }
-  return false;
+  if (bAll) {
+    wsIndex = L"1";
+    m_iCreateFlag = XFA_RESOLVENODE_RSTYPE_CreateNodeAll;
+  } else {
+    m_iCreateFlag = XFA_RESOLVENODE_RSTYPE_CreateNodeOne;
+    wsIndex = wsCondition.Mid(i, iLen - 1 - i);
+  }
+  int32_t iIndex = wsIndex.GetInteger();
+  m_iCreateCount = iIndex;
+  return true;
 }
 
 bool CXFA_NodeHelper::ResolveNodes_CreateNode(WideString wsName,