mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Fix pnUtils for clang.
This commit is contained in:
@ -823,7 +823,7 @@ void TArray<T,C>::AdjustSizeChunked (unsigned newAlloc, unsigned newCount) {
|
|||||||
|
|
||||||
// Process growing the allocation
|
// Process growing the allocation
|
||||||
else
|
else
|
||||||
newAlloc = CalcAllocGrowth(newAlloc, this->m_alloc, &this->m_chunkSize);
|
newAlloc = this->CalcAllocGrowth(newAlloc, this->m_alloc, &this->m_chunkSize);
|
||||||
|
|
||||||
// Perform the allocation
|
// Perform the allocation
|
||||||
this->AdjustSize(newAlloc, newCount);
|
this->AdjustSize(newAlloc, newCount);
|
||||||
|
@ -52,6 +52,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#include "pnUtList.h"
|
#include "pnUtList.h"
|
||||||
#include "pnUtArray.h"
|
#include "pnUtArray.h"
|
||||||
#include "pnUtMath.h"
|
#include "pnUtMath.h"
|
||||||
|
#include "pnUtStr.h"
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
*
|
*
|
||||||
@ -536,7 +537,7 @@ const T * THashTable<T,K>::Find (const K & key) const {
|
|||||||
unsigned hash = key.GetHash();
|
unsigned hash = key.GetHash();
|
||||||
const LIST(T) & slotList = this->GetSlotList(hash);
|
const LIST(T) & slotList = this->GetSlotList(hash);
|
||||||
for (const T * curr = slotList.Head(); curr; curr = slotList.Next(curr))
|
for (const T * curr = slotList.Head(); curr; curr = slotList.Next(curr))
|
||||||
if ((GetHash(curr) == hash) && (*curr == key))
|
if ((this->GetHash(curr) == hash) && (*curr == key))
|
||||||
return curr;
|
return curr;
|
||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
@ -69,6 +69,25 @@ static uint32_t s_hashValue[] = {
|
|||||||
* Internal functions
|
* Internal functions
|
||||||
*
|
*
|
||||||
***/
|
***/
|
||||||
|
//===========================================================================
|
||||||
|
template<class chartype>
|
||||||
|
static unsigned IStrLen (const chartype str[]) {
|
||||||
|
unsigned chars = 0;
|
||||||
|
for (; *str++; ++chars)
|
||||||
|
NULL_STMT;
|
||||||
|
return chars;
|
||||||
|
}
|
||||||
|
|
||||||
|
//===========================================================================
|
||||||
|
template<class chartype>
|
||||||
|
static void IStrCopy (chartype * dest, const chartype source[], unsigned chars) {
|
||||||
|
while ((chars > 1) && ((*dest = *source++) != 0)) {
|
||||||
|
--chars;
|
||||||
|
++dest;
|
||||||
|
}
|
||||||
|
if (chars)
|
||||||
|
*dest = 0;
|
||||||
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
template<class chartype>
|
template<class chartype>
|
||||||
@ -207,17 +226,6 @@ static int IStrCmpI (const chartype str1[], const chartype str2[], unsigned char
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
|
||||||
template<class chartype>
|
|
||||||
static void IStrCopy (chartype * dest, const chartype source[], unsigned chars) {
|
|
||||||
while ((chars > 1) && ((*dest = *source++) != 0)) {
|
|
||||||
--chars;
|
|
||||||
++dest;
|
|
||||||
}
|
|
||||||
if (chars)
|
|
||||||
*dest = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
// returns StrLen(dest)
|
// returns StrLen(dest)
|
||||||
template<class chartype>
|
template<class chartype>
|
||||||
@ -284,15 +292,6 @@ static chartype * IStrStrI (chartype source[], const chartype match[]) {
|
|||||||
return nil;
|
return nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
|
||||||
template<class chartype>
|
|
||||||
static unsigned IStrLen (const chartype str[]) {
|
|
||||||
unsigned chars = 0;
|
|
||||||
for (; *str++; ++chars)
|
|
||||||
NULL_STMT;
|
|
||||||
return chars;
|
|
||||||
}
|
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
template<class chartype>
|
template<class chartype>
|
||||||
static void IStrLower (chartype * dest, unsigned chars) {
|
static void IStrLower (chartype * dest, unsigned chars) {
|
||||||
|
@ -50,6 +50,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
|
|
||||||
#include "Pch.h"
|
#include "Pch.h"
|
||||||
#include "pnUtArray.h"
|
#include "pnUtArray.h"
|
||||||
|
#include <wchar.h>
|
||||||
|
|
||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
|
Reference in New Issue
Block a user