Bug 1411034 - Remove the const to fix the -Wignored-qualifiers warning r?erahm draft
authorSylvestre Ledru <sledru@mozilla.com>
Mon, 23 Oct 2017 22:42:35 +0200
changeset 684997 4e5d9519b8f832ed6138f9fb10b3bf15065ae81a
parent 684996 84d575a3b8ded3a47bb3d348f7645419111bab4e
child 684998 2811997444e1c13670bf5606e2fbb6f47f0a3d50
push id85794
push userbmo:sledru@mozilla.com
push dateMon, 23 Oct 2017 21:42:28 +0000
reviewerserahm
bugs1411034
milestone58.0a1
Bug 1411034 - Remove the const to fix the -Wignored-qualifiers warning r?erahm MozReview-Commit-ID: 8AvGwUQsdE8
xpcom/ds/nsTHashtable.h
xpcom/string/nsReadableUtilsImpl.h
--- a/xpcom/ds/nsTHashtable.h
+++ b/xpcom/ds/nsTHashtable.h
@@ -409,26 +409,26 @@ nsTHashtable<EntryType>::Ops()
 }
 
 // static definitions
 
 template<class EntryType>
 PLDHashNumber
 nsTHashtable<EntryType>::s_HashKey(const void* aKey)
 {
-  return EntryType::HashKey(static_cast<const KeyTypePointer>(aKey));
+  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(
-    static_cast<const KeyTypePointer>(aKey));
+    static_cast<KeyTypePointer>(aKey));
 }
 
 template<class EntryType>
 void
 nsTHashtable<EntryType>::s_CopyEntry(PLDHashTable* aTable,
                                      const PLDHashEntryHdr* aFrom,
                                      PLDHashEntryHdr* aTo)
 {
--- a/xpcom/string/nsReadableUtilsImpl.h
+++ b/xpcom/string/nsReadableUtilsImpl.h
@@ -13,17 +13,17 @@ inline bool IsASCII(char16_t aChar) {
 }
 
 /**
  * Provides a pointer before or equal to |aPtr| that is is suitably aligned.
  */
 inline const char16_t* aligned(const char16_t* aPtr, const uintptr_t aMask)
 {
   return reinterpret_cast<const char16_t*>(
-      reinterpret_cast<const uintptr_t>(aPtr) & ~aMask);
+      reinterpret_cast<uintptr_t>(aPtr) & ~aMask);
 }
 
 /**
  * Structures for word-sized vectorization of ASCII checking for UTF-16
  * strings.
  */
 template<size_t size> struct NonASCIIParameters;
 template<> struct NonASCIIParameters<4> {