Bug 1594887 - Follow-up: Reformat. rs=reformat
authorJorg K <jorgk@jorgk.com>
Tue, 10 Dec 2019 22:56:47 +0100
changeset 37725 f2927c0ca07600af75441f19e96ada11603ff7f4
parent 37724 fe7a42d2ace39cfe4114ba512c314bff10160b4d
child 37726 49bc32a100a3817e2d6b5b41a13bccc95f5cb081
push id397
push userclokep@gmail.com
push dateMon, 10 Feb 2020 21:16:13 +0000
reviewersreformat
bugs1594887
Bug 1594887 - Follow-up: Reformat. rs=reformat
mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp
--- a/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp
+++ b/mailnews/extensions/bayesian-spam-filter/src/nsBayesianFilter.cpp
@@ -1400,56 +1400,57 @@ void nsBayesianFilter::classifyMessage(
       if (NS_FAILED(rv)) {
         NS_ERROR("trait service failed to get aliases");
         MOZ_LOG(BayesianFilterLogModule, LogLevel::Error,
                 ("trait service failed to get aliases"));
       }
     }
     proAliasArrays.AppendElement(proAliases);
     uint32_t proMessageCount = mCorpus.getMessageCount(proTrait);
-    for (uint32_t aliasIndex = 0; aliasIndex < proAliases.Length(); aliasIndex++)
+    for (uint32_t aliasIndex = 0; aliasIndex < proAliases.Length();
+         aliasIndex++)
       proMessageCount += mCorpus.getMessageCount(proAliases[aliasIndex]);
     numProMessages.AppendElement(proMessageCount);
 
     // anti trait
     nsTArray<uint32_t> antiAliases;
     uint32_t antiTrait = aAntiTraits[traitIndex];
     if (traitService) {
-      rv =
-          traitService->GetAliases(antiTrait, antiAliases);
+      rv = traitService->GetAliases(antiTrait, antiAliases);
       if (NS_FAILED(rv)) {
         NS_ERROR("trait service failed to get aliases");
         MOZ_LOG(BayesianFilterLogModule, LogLevel::Error,
                 ("trait service failed to get aliases"));
       }
     }
     antiAliasArrays.AppendElement(antiAliases);
     uint32_t antiMessageCount = mCorpus.getMessageCount(antiTrait);
-    for (uint32_t aliasIndex = 0; aliasIndex < antiAliases.Length(); aliasIndex++)
+    for (uint32_t aliasIndex = 0; aliasIndex < antiAliases.Length();
+         aliasIndex++)
       antiMessageCount += mCorpus.getMessageCount(antiAliases[aliasIndex]);
     numAntiMessages.AppendElement(antiMessageCount);
   }
 
   for (uint32_t i = 0; i < tokenCount; ++i) {
     Token& token = tokens[i];
     CorpusToken* t = mCorpus.get(token.mWord);
     if (!t) continue;
     for (uint32_t traitIndex = 0; traitIndex < traitCount; traitIndex++) {
       uint32_t iProCount = mCorpus.getTraitCount(t, aProTraits[traitIndex]);
       // add in any counts for aliases to proTrait
-      for (uint32_t aliasIndex = 0; aliasIndex < proAliasArrays[traitIndex].Length();
-           aliasIndex++)
+      for (uint32_t aliasIndex = 0;
+           aliasIndex < proAliasArrays[traitIndex].Length(); aliasIndex++)
         iProCount +=
             mCorpus.getTraitCount(t, proAliasArrays[traitIndex][aliasIndex]);
       double proCount = static_cast<double>(iProCount);
 
       uint32_t iAntiCount = mCorpus.getTraitCount(t, aAntiTraits[traitIndex]);
       // add in any counts for aliases to antiTrait
-      for (uint32_t aliasIndex = 0; aliasIndex < antiAliasArrays[traitIndex].Length();
-           aliasIndex++)
+      for (uint32_t aliasIndex = 0;
+           aliasIndex < antiAliasArrays[traitIndex].Length(); aliasIndex++)
         iAntiCount +=
             mCorpus.getTraitCount(t, antiAliasArrays[traitIndex][aliasIndex]);
       double antiCount = static_cast<double>(iAntiCount);
 
       double prob, denom;
       // Prevent a divide by zero error by setting defaults for prob
 
       // If there are no matching tokens at all, ignore.