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.
git-svn-id: svn://10.0.0.236/trunk@229504 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -293,7 +293,7 @@ nsCommandParams::GetNamedEntry(const char * name)
|
||||
nsCommandParams::HashEntry*
|
||||
nsCommandParams::GetIndexedEntry(PRInt32 index)
|
||||
{
|
||||
HashEntry* entry = NS_REINTERPRET_CAST(HashEntry*, mValuesHash.entryStore);
|
||||
HashEntry* entry = reinterpret_cast<HashEntry*>(mValuesHash.entryStore);
|
||||
HashEntry* limit = entry + PL_DHASH_TABLE_SIZE(&mValuesHash);
|
||||
PRUint32 entryCount = 0;
|
||||
|
||||
@@ -315,7 +315,7 @@ nsCommandParams::GetIndexedEntry(PRInt32 index)
|
||||
PRUint32
|
||||
nsCommandParams::GetNumEntries()
|
||||
{
|
||||
HashEntry* entry = NS_REINTERPRET_CAST(HashEntry*, mValuesHash.entryStore);
|
||||
HashEntry* entry = reinterpret_cast<HashEntry*>(mValuesHash.entryStore);
|
||||
HashEntry* limit = entry + PL_DHASH_TABLE_SIZE(&mValuesHash);
|
||||
PRUint32 entryCount = 0;
|
||||
|
||||
@@ -364,7 +364,7 @@ nsCommandParams::HashMatchEntry(PLDHashTable *table,
|
||||
const PLDHashEntryHdr *entry, const void *key)
|
||||
{
|
||||
const char* keyString = (const char*)key;
|
||||
const HashEntry* thisEntry = NS_STATIC_CAST(const HashEntry*, entry);
|
||||
const HashEntry* thisEntry = static_cast<const HashEntry*>(entry);
|
||||
|
||||
return thisEntry->mEntryName.Equals(keyString);
|
||||
}
|
||||
@@ -373,8 +373,8 @@ void
|
||||
nsCommandParams::HashMoveEntry(PLDHashTable *table, const PLDHashEntryHdr *from,
|
||||
PLDHashEntryHdr *to)
|
||||
{
|
||||
const HashEntry* fromEntry = NS_STATIC_CAST(const HashEntry*, from);
|
||||
HashEntry* toEntry = NS_STATIC_CAST(HashEntry*, to);
|
||||
const HashEntry* fromEntry = static_cast<const HashEntry*>(from);
|
||||
HashEntry* toEntry = static_cast<HashEntry*>(to);
|
||||
|
||||
*toEntry = *fromEntry;
|
||||
// we leave from dirty, but that's OK
|
||||
@@ -383,7 +383,7 @@ nsCommandParams::HashMoveEntry(PLDHashTable *table, const PLDHashEntryHdr *from,
|
||||
void
|
||||
nsCommandParams::HashClearEntry(PLDHashTable *table, PLDHashEntryHdr *entry)
|
||||
{
|
||||
HashEntry* thisEntry = NS_STATIC_CAST(HashEntry*, entry);
|
||||
HashEntry* thisEntry = static_cast<HashEntry*>(entry);
|
||||
thisEntry->~HashEntry(); // call dtor explicitly
|
||||
memset(thisEntry, 0, sizeof(HashEntry)); // and clear out
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user