Bug 1614846 - Tweaks requested by clang-format. r=mkmelin
authorBen Campbell <benc@thunderbird.net>
Thu, 13 Feb 2020 13:21:14 +1300
changeset 37517 cd8871b0a49c89f2265cb1c039f1efe139052fb8
parent 37516 1da9c365060718ffc88deb4d39b3930aeb02a1a7
child 37518 d1e9c855e2476af1edeb549575195eae1c318354
push id2566
push userclokep@gmail.com
push dateMon, 09 Mar 2020 19:20:31 +0000
treeherdercomm-beta@a352facfa0a4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmkmelin
bugs1614846
Bug 1614846 - Tweaks requested by clang-format. r=mkmelin
mailnews/base/src/nsMsgAccountManager.cpp
mailnews/compose/src/nsMsgSendLater.cpp
mailnews/imap/src/nsAutoSyncManager.cpp
--- a/mailnews/base/src/nsMsgAccountManager.cpp
+++ b/mailnews/base/src/nsMsgAccountManager.cpp
@@ -151,18 +151,18 @@ nsresult nsMsgAccountManager::Shutdown()
 
   nsresult rv;
 
   SaveVirtualFolders();
 
   nsCOMPtr<nsIMsgDBService> msgDBService =
       do_GetService(NS_MSGDB_SERVICE_CONTRACTID, &rv);
   if (msgDBService) {
-    nsTObserverArray<RefPtr<VirtualFolderChangeListener> >::ForwardIterator
-        iter(m_virtualFolderListeners);
+    nsTObserverArray<RefPtr<VirtualFolderChangeListener>>::ForwardIterator iter(
+        m_virtualFolderListeners);
     RefPtr<VirtualFolderChangeListener> listener;
 
     while (iter.HasMore()) {
       listener = iter.GetNext();
       msgDBService->UnregisterPendingListener(listener);
     }
   }
   if (m_msgFolderCache) WriteToFolderCache(m_msgFolderCache);
@@ -557,28 +557,28 @@ nsresult nsMsgAccountManager::createKeye
   m_incomingServers.Put(key, server);
 
   // now add all listeners that are supposed to be
   // waiting on root folders
   nsCOMPtr<nsIMsgFolder> rootFolder;
   rv = server->GetRootFolder(getter_AddRefs(rootFolder));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  nsTObserverArray<nsCOMPtr<nsIFolderListener> >::ForwardIterator iter(
+  nsTObserverArray<nsCOMPtr<nsIFolderListener>>::ForwardIterator iter(
       mFolderListeners);
   while (iter.HasMore()) {
     rootFolder->AddFolderListener(iter.GetNext());
   }
 
   server.forget(aServer);
   return NS_OK;
 }
 
 void nsMsgAccountManager::removeListenersFromFolder(nsIMsgFolder *aFolder) {
-  nsTObserverArray<nsCOMPtr<nsIFolderListener> >::ForwardIterator iter(
+  nsTObserverArray<nsCOMPtr<nsIFolderListener>>::ForwardIterator iter(
       mFolderListeners);
   while (iter.HasMore()) {
     aFolder->RemoveFolderListener(iter.GetNext());
   }
 }
 
 NS_IMETHODIMP
 nsMsgAccountManager::RemoveAccount(nsIMsgAccount *aAccount,
@@ -2936,17 +2936,17 @@ nsresult nsMsgAccountManager::AddVFListe
 // has gone away.
 nsresult nsMsgAccountManager::RemoveVFListenerForVF(nsIMsgFolder *virtualFolder,
                                                     nsIMsgFolder *folder) {
   nsresult rv;
   nsCOMPtr<nsIMsgDBService> msgDBService(
       do_GetService(NS_MSGDB_SERVICE_CONTRACTID, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  nsTObserverArray<RefPtr<VirtualFolderChangeListener> >::ForwardIterator iter(
+  nsTObserverArray<RefPtr<VirtualFolderChangeListener>>::ForwardIterator iter(
       m_virtualFolderListeners);
   RefPtr<VirtualFolderChangeListener> listener;
 
   while (iter.HasMore()) {
     listener = iter.GetNext();
     if (listener->m_folderWatching == folder &&
         listener->m_virtualFolder == virtualFolder) {
       msgDBService->UnregisterPendingListener(listener);
@@ -3021,18 +3021,18 @@ NS_IMETHODIMP nsMsgAccountManager::OnIte
       folderFlags |= nsMsgFolderFlags::Trash;
     }
   }
   nsresult rv = NS_OK;
   // if this is a special folder, check if we have a saved search over
   // folders with this flag, and if so, add this folder to the scope.
   if (addToSmartFolders) {
     // quick way to enumerate the saved searches.
-    nsTObserverArray<RefPtr<VirtualFolderChangeListener> >::ForwardIterator
-        iter(m_virtualFolderListeners);
+    nsTObserverArray<RefPtr<VirtualFolderChangeListener>>::ForwardIterator iter(
+        m_virtualFolderListeners);
     RefPtr<VirtualFolderChangeListener> listener;
 
     while (iter.HasMore()) {
       listener = iter.GetNext();
       nsCOMPtr<nsIMsgDatabase> db;
       nsCOMPtr<nsIDBFolderInfo> dbFolderInfo;
       listener->m_virtualFolder->GetDBFolderInfoAndDB(
           getter_AddRefs(dbFolderInfo), getter_AddRefs(db));
@@ -3128,17 +3128,17 @@ NS_IMETHODIMP nsMsgAccountManager::OnIte
 
   // build a "normalized" uri that we can do a find on.
   nsCString removedFolderURI;
   folder->GetURI(removedFolderURI);
   removedFolderURI.Insert('|', 0);
   removedFolderURI.Append('|');
 
   // Enumerate the saved searches.
-  nsTObserverArray<RefPtr<VirtualFolderChangeListener> >::ForwardIterator iter(
+  nsTObserverArray<RefPtr<VirtualFolderChangeListener>>::ForwardIterator iter(
       m_virtualFolderListeners);
   RefPtr<VirtualFolderChangeListener> listener;
 
   while (iter.HasMore()) {
     listener = iter.GetNext();
     nsCOMPtr<nsIMsgDatabase> db;
     nsCOMPtr<nsIDBFolderInfo> dbFolderInfo;
     nsCOMPtr<nsIMsgFolder> savedSearch = listener->m_virtualFolder;
@@ -3236,17 +3236,17 @@ nsresult nsMsgAccountManager::RemoveFold
   aFolder->GetURI(removedFolderURI);
   removedFolderURI.Insert('|', 0);
   removedFolderURI.Append('|');
   uint32_t flags;
   aFolder->GetFlags(&flags);
   NS_ASSERTION(!(flags & flagsChanged), "smart folder flag should not be set");
   // Flag was removed. Look for smart folder based on that flag,
   // and remove this folder from its scope.
-  nsTObserverArray<RefPtr<VirtualFolderChangeListener> >::ForwardIterator iter(
+  nsTObserverArray<RefPtr<VirtualFolderChangeListener>>::ForwardIterator iter(
       m_virtualFolderListeners);
   RefPtr<VirtualFolderChangeListener> listener;
 
   while (iter.HasMore()) {
     listener = iter.GetNext();
     nsCOMPtr<nsIMsgDatabase> db;
     nsCOMPtr<nsIDBFolderInfo> dbFolderInfo;
     listener->m_virtualFolder->GetDBFolderInfoAndDB(
--- a/mailnews/compose/src/nsMsgSendLater.cpp
+++ b/mailnews/compose/src/nsMsgSendLater.cpp
@@ -1134,25 +1134,25 @@ nsMsgSendLater::RemoveListener(nsIMsgSen
 
 NS_IMETHODIMP
 nsMsgSendLater::GetSendingMessages(bool *aResult) {
   NS_ENSURE_ARG_POINTER(aResult);
   *aResult = mSendingMessages;
   return NS_OK;
 }
 
-#define NOTIFY_LISTENERS(propertyfunc_, params_)                              \
-  PR_BEGIN_MACRO                                                              \
-  nsTObserverArray<nsCOMPtr<nsIMsgSendLaterListener> >::ForwardIterator iter( \
-      mListenerArray);                                                        \
-  nsCOMPtr<nsIMsgSendLaterListener> listener;                                 \
-  while (iter.HasMore()) {                                                    \
-    listener = iter.GetNext();                                                \
-    listener->propertyfunc_ params_;                                          \
-  }                                                                           \
+#define NOTIFY_LISTENERS(propertyfunc_, params_)                             \
+  PR_BEGIN_MACRO                                                             \
+  nsTObserverArray<nsCOMPtr<nsIMsgSendLaterListener>>::ForwardIterator iter( \
+      mListenerArray);                                                       \
+  nsCOMPtr<nsIMsgSendLaterListener> listener;                                \
+  while (iter.HasMore()) {                                                   \
+    listener = iter.GetNext();                                               \
+    listener->propertyfunc_ params_;                                         \
+  }                                                                          \
   PR_END_MACRO
 
 void nsMsgSendLater::NotifyListenersOnStartSending(
     uint32_t aTotalMessageCount) {
   NOTIFY_LISTENERS(OnStartSending, (aTotalMessageCount));
 }
 
 void nsMsgSendLater::NotifyListenersOnMessageStartSending(
--- a/mailnews/imap/src/nsAutoSyncManager.cpp
+++ b/mailnews/imap/src/nsAutoSyncManager.cpp
@@ -178,25 +178,25 @@ nsDefaultAutoSyncFolderStrategy::IsExclu
     // Exclude orphans
     nsCOMPtr<nsIMsgFolder> parent;
     aFolder->GetParent(getter_AddRefs(parent));
     if (!parent) *aDecision = true;
   }
   return NS_OK;
 }
 
-#define NOTIFY_LISTENERS_STATIC(obj_, propertyfunc_, params_)                \
-  PR_BEGIN_MACRO                                                             \
-  nsTObserverArray<nsCOMPtr<nsIAutoSyncMgrListener> >::ForwardIterator iter( \
-      obj_->mListeners);                                                     \
-  nsCOMPtr<nsIAutoSyncMgrListener> listener;                                 \
-  while (iter.HasMore()) {                                                   \
-    listener = iter.GetNext();                                               \
-    listener->propertyfunc_ params_;                                         \
-  }                                                                          \
+#define NOTIFY_LISTENERS_STATIC(obj_, propertyfunc_, params_)               \
+  PR_BEGIN_MACRO                                                            \
+  nsTObserverArray<nsCOMPtr<nsIAutoSyncMgrListener>>::ForwardIterator iter( \
+      obj_->mListeners);                                                    \
+  nsCOMPtr<nsIAutoSyncMgrListener> listener;                                \
+  while (iter.HasMore()) {                                                  \
+    listener = iter.GetNext();                                              \
+    listener->propertyfunc_ params_;                                        \
+  }                                                                         \
   PR_END_MACRO
 
 #define NOTIFY_LISTENERS(propertyfunc_, params_) \
   NOTIFY_LISTENERS_STATIC(this, propertyfunc_, params_)
 
 nsAutoSyncManager::nsAutoSyncManager() {
   mGroupSize = kDefaultGroupSize;