Bug 348748 - Replace all instances of NS_STATIC_CAST and friends with C++ casts (and simultaneously bitrot nearly every patch in existence). r=bsmedberg on the script that did this. Tune in next time for Macro Wars: Episode II: Attack on the LL_* Macros.
authorjwalden@mit.edu
Sun, 08 Jul 2007 00:08:04 -0700
changeset 20351 d6379755a5390980f0e6981d832326aca8dd00e3
parent 20350 1a2269db784268294c185062ad1fccc7d6b552c9
child 20352 c9623c37501d57d05fc35f3dc673632b4479a756
push id1209
push usermbanner@mozilla.com
push dateTue, 02 Sep 2014 16:59:36 +0000
treeherdercomm-beta@842e0fd167ee [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs348748
Bug 348748 - Replace all instances of NS_STATIC_CAST and friends with C++ casts (and simultaneously bitrot nearly every patch in existence). r=bsmedberg on the script that did this. Tune in next time for Macro Wars: Episode II: Attack on the LL_* Macros.
mailnews/mime/src/nsCMS.cpp
mailnews/mime/src/nsCMSSecureMessage.cpp
--- a/mailnews/mime/src/nsCMS.cpp
+++ b/mailnews/mime/src/nsCMS.cpp
@@ -872,17 +872,17 @@ void nsCMSEncoder::destructorSafeDestroy
 /* void start (); */
 NS_IMETHODIMP nsCMSEncoder::Start(nsICMSMessage *aMsg, NSSCMSContentCallback cb, void * arg)
 {
   nsNSSShutDownPreventionLock locker;
   if (isAlreadyShutDown())
     return NS_ERROR_NOT_AVAILABLE;
 
   PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("nsCMSEncoder::Start\n"));
-  nsCMSMessage *cmsMsg = NS_STATIC_CAST(nsCMSMessage*, aMsg);
+  nsCMSMessage *cmsMsg = static_cast<nsCMSMessage*>(aMsg);
   m_ctx = new PipUIContext();
 
   m_ecx = NSS_CMSEncoder_Start(cmsMsg->getCMS(), cb, arg, 0, 0, 0, m_ctx, 0, 0, 0, 0);
   if (m_ecx == nsnull) {
     PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("nsCMSEncoder::Start - can't start encoder\n"));
     return NS_ERROR_FAILURE;
   }
   return NS_OK;
--- a/mailnews/mime/src/nsCMSSecureMessage.cpp
+++ b/mailnews/mime/src/nsCMSSecureMessage.cpp
@@ -102,17 +102,17 @@ GetCertByPrefID(const char *certID, char
     goto done;
   }
 
   rv = prefs->GetCharPref(certID,
                           getter_Copies(nickname));
   if (NS_FAILED(rv)) goto done;
 
   /* Find a good cert in the user's database */
-  cert = CERT_FindUserCertByUsage(CERT_GetDefaultCertDB(), NS_CONST_CAST(char*, nickname.get()), 
+  cert = CERT_FindUserCertByUsage(CERT_GetDefaultCertDB(), const_cast<char*>(nickname.get()), 
            certUsageEmailRecipient, PR_TRUE, ctx);
 
   if (!cert) { 
     /* Success, but no value */
     PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("nsCMSSecureMessage::GetCertByPrefID - can't find user cert\n"));
     goto done;
   }