Bug 1509916 - use less C-style casting in nsTHashtable.h; r=erahm
authorNathan Froyd <froydnj@mozilla.com>
Mon, 26 Nov 2018 12:39:11 -0500
changeset 504454 c4508d6ea52f4654ee131de9b7c4042ad5fc4f43
parent 504453 b9f771437a1212f4de43cc8419803390358b0ca3
child 504455 5fb44413dac138585f4783470e5c9e9d7cf501f3
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerserahm
bugs1509916
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1509916 - use less C-style casting in nsTHashtable.h; r=erahm
xpcom/ds/nsTHashtable.h
--- a/xpcom/ds/nsTHashtable.h
+++ b/xpcom/ds/nsTHashtable.h
@@ -446,17 +446,17 @@ nsTHashtable<EntryType>::s_HashKey(const
   return EntryType::HashKey(static_cast<KeyTypePointer>(aKey));
 }
 
 template<class EntryType>
 bool
 nsTHashtable<EntryType>::s_MatchEntry(const PLDHashEntryHdr* aEntry,
                                       const void* aKey)
 {
-  return ((const EntryType*)aEntry)->KeyEquals(
+  return (static_cast<const EntryType*>(aEntry))->KeyEquals(
     static_cast<KeyTypePointer>(aKey));
 }
 
 template<class EntryType>
 void
 nsTHashtable<EntryType>::s_CopyEntry(PLDHashTable* aTable,
                                      const PLDHashEntryHdr* aFrom,
                                      PLDHashEntryHdr* aTo)