Bug 1612247 - Incidental tweaks from clang-format. r=mkmelin
authorBen Campbell <benc@thunderbird.net>
Fri, 08 May 2020 13:34:12 +0300
changeset 39090 88fa0b6a2919c6b4b77fb7b97d29647dc386be1b
parent 39089 01d4d3db44e6c509076df5fda8f37064d9652c78
child 39091 fb6c146796e18260bcb3aeb88de04d1393d5a684
push id402
push userclokep@gmail.com
push dateMon, 29 Jun 2020 20:48:04 +0000
reviewersmkmelin
bugs1612247
Bug 1612247 - Incidental tweaks from clang-format. r=mkmelin
mailnews/db/msgdb/public/nsMsgDatabase.h
mailnews/db/msgdb/src/nsMsgDatabase.cpp
--- a/mailnews/db/msgdb/public/nsMsgDatabase.h
+++ b/mailnews/db/msgdb/public/nsMsgDatabase.h
@@ -345,17 +345,17 @@ class nsMsgDatabase : public nsIMsgDatab
   nsCOMPtr<nsIMdbThumb> m_thumb;
   // used to remember the args to Open for async open.
   bool m_create;
   bool m_leaveInvalidDB;
 
   nsCOMPtr<nsIFile> m_dbFile;
   nsTArray<nsMsgKey> m_newSet;  // new messages since last open.
   bool m_mdbTokensInitialized;
-  nsTObserverArray<nsCOMPtr<nsIDBChangeListener> > m_ChangeListeners;
+  nsTObserverArray<nsCOMPtr<nsIDBChangeListener>> m_ChangeListeners;
   mdb_token m_hdrRowScopeToken;
   mdb_token m_threadRowScopeToken;
   mdb_token m_hdrTableKindToken;
   mdb_token m_threadTableKindToken;
   mdb_token m_allThreadsTableKindToken;
   mdb_token m_subjectColumnToken;
   mdb_token m_senderColumnToken;
   mdb_token m_messageIdColumnToken;
--- a/mailnews/db/msgdb/src/nsMsgDatabase.cpp
+++ b/mailnews/db/msgdb/src/nsMsgDatabase.cpp
@@ -752,25 +752,25 @@ NS_IMETHODIMP nsMsgDatabase::AddListener
 
 NS_IMETHODIMP nsMsgDatabase::RemoveListener(nsIDBChangeListener *aListener) {
   NS_ENSURE_ARG_POINTER(aListener);
   m_ChangeListeners.RemoveElement(aListener);
   return NS_OK;
 }
 
 // XXX should we return rv for listener->propertyfunc_?
-#define NOTIFY_LISTENERS(propertyfunc_, params_)                          \
-  PR_BEGIN_MACRO                                                          \
-  nsTObserverArray<nsCOMPtr<nsIDBChangeListener> >::ForwardIterator iter( \
-      m_ChangeListeners);                                                 \
-  nsCOMPtr<nsIDBChangeListener> listener;                                 \
-  while (iter.HasMore()) {                                                \
-    listener = iter.GetNext();                                            \
-    listener->propertyfunc_ params_;                                      \
-  }                                                                       \
+#define NOTIFY_LISTENERS(propertyfunc_, params_)                         \
+  PR_BEGIN_MACRO                                                         \
+  nsTObserverArray<nsCOMPtr<nsIDBChangeListener>>::ForwardIterator iter( \
+      m_ChangeListeners);                                                \
+  nsCOMPtr<nsIDBChangeListener> listener;                                \
+  while (iter.HasMore()) {                                               \
+    listener = iter.GetNext();                                           \
+    listener->propertyfunc_ params_;                                     \
+  }                                                                      \
   PR_END_MACRO
 
 // change announcer methods - just broadcast to all listeners.
 NS_IMETHODIMP nsMsgDatabase::NotifyHdrChangeAll(
     nsIMsgDBHdr *aHdrChanged, uint32_t aOldFlags, uint32_t aNewFlags,
     nsIDBChangeListener *aInstigator) {
   // We will only notify the change if the header exists in the database.
   // This allows database functions to be usable in both the case where the
@@ -2176,17 +2176,17 @@ NS_IMETHODIMP nsMsgDatabase::SetStringPr
   // if no change to this string property, bail out
   if (oldValue.Equals(aValue)) return NS_OK;
 
   // Precall OnHdrPropertyChanged to store prechange status
   nsTArray<uint32_t> statusArray(m_ChangeListeners.Length());
   uint32_t status;
   nsCOMPtr<nsIDBChangeListener> listener;
   if (notify) {
-    nsTObserverArray<nsCOMPtr<nsIDBChangeListener> >::ForwardIterator listeners(
+    nsTObserverArray<nsCOMPtr<nsIDBChangeListener>>::ForwardIterator listeners(
         m_ChangeListeners);
     while (listeners.HasMore()) {
       listener = listeners.GetNext();
       listener->OnHdrPropertyChanged(msgHdr, true, &status, nullptr);
       // ignore errors, but append element to keep arrays in sync
       statusArray.AppendElement(status);
     }
   }
@@ -2197,17 +2197,17 @@ NS_IMETHODIMP nsMsgDatabase::SetStringPr
   // Postcall OnHdrPropertyChanged to process the change
   if (notify) {
     // if this is the junk score property notify, as long as we're not going
     // from no value to non junk
     if (!strcmp(aProperty, "junkscore") &&
         !(oldValue.IsEmpty() && !strcmp(aValue, "0")))
       NotifyJunkScoreChanged(nullptr);
 
-    nsTObserverArray<nsCOMPtr<nsIDBChangeListener> >::ForwardIterator listeners(
+    nsTObserverArray<nsCOMPtr<nsIDBChangeListener>>::ForwardIterator listeners(
         m_ChangeListeners);
     for (uint32_t i = 0; listeners.HasMore(); i++) {
       listener = listeners.GetNext();
       status = statusArray[i];
       listener->OnHdrPropertyChanged(msgHdr, false, &status, nullptr);
       // ignore errors
     }
   }
@@ -2230,32 +2230,32 @@ nsMsgDatabase::SetUint32PropertyByHdr(ns
   aMsgHdr->GetMessageKey(&key);
   ContainsKey(key, &notify);
 
   // Precall OnHdrPropertyChanged to store prechange status.
   nsTArray<uint32_t> statusArray(m_ChangeListeners.Length());
   uint32_t status;
   nsCOMPtr<nsIDBChangeListener> listener;
   if (notify) {
-    nsTObserverArray<nsCOMPtr<nsIDBChangeListener> >::ForwardIterator listeners(
+    nsTObserverArray<nsCOMPtr<nsIDBChangeListener>>::ForwardIterator listeners(
         m_ChangeListeners);
     while (listeners.HasMore()) {
       listener = listeners.GetNext();
       listener->OnHdrPropertyChanged(aMsgHdr, true, &status, nullptr);
       // Ignore errors, but append element to keep arrays in sync.
       statusArray.AppendElement(status);
     }
   }
 
   rv = aMsgHdr->SetUint32Property(aProperty, aValue);
   NS_ENSURE_SUCCESS(rv, rv);
 
   // Postcall OnHdrPropertyChanged to process the change.
   if (notify) {
-    nsTObserverArray<nsCOMPtr<nsIDBChangeListener> >::ForwardIterator listeners(
+    nsTObserverArray<nsCOMPtr<nsIDBChangeListener>>::ForwardIterator listeners(
         m_ChangeListeners);
     for (uint32_t i = 0; listeners.HasMore(); i++) {
       listener = listeners.GetNext();
       status = statusArray[i];
       listener->OnHdrPropertyChanged(aMsgHdr, false, &status, nullptr);
       // Ignore errors.
     }
   }