mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
A few more asterisks, mostly casts
This commit is contained in:
parent
f15ffda5a7
commit
4b06e92731
@ -733,7 +733,7 @@ public:
|
||||
void QuickCallFunction(ARM64Reg scratchreg, const void* func);
|
||||
template <typename T> void QuickCallFunction(ARM64Reg scratchreg, T func)
|
||||
{
|
||||
QuickCallFunction(scratchreg, (const void *)func);
|
||||
QuickCallFunction(scratchreg, (const void*)func);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -104,7 +104,7 @@ u32 HashEctor(const u8* ptr, int length)
|
||||
// Block read - if your platform needs to do endian-swapping or can only
|
||||
// handle aligned reads, do the conversion here
|
||||
|
||||
inline u64 getblock(const u64 * p, int i)
|
||||
inline u64 getblock(const u64* p, int i)
|
||||
{
|
||||
return p[i];
|
||||
}
|
||||
@ -151,7 +151,7 @@ inline u64 fmix64(u64 k)
|
||||
|
||||
u64 GetMurmurHash3(const u8* src, u32 len, u32 samples)
|
||||
{
|
||||
const u8 * data = (const u8*)src;
|
||||
const u8* data = (const u8*)src;
|
||||
const int nblocks = len / 16;
|
||||
u32 Step = (len / 8);
|
||||
if (samples == 0)
|
||||
@ -170,7 +170,7 @@ u64 GetMurmurHash3(const u8* src, u32 len, u32 samples)
|
||||
//----------
|
||||
// body
|
||||
|
||||
const u64 * blocks = (const u64 *)(data);
|
||||
const u64* blocks = (const u64*)(data);
|
||||
|
||||
for (int i = 0; i < nblocks; i+=Step)
|
||||
{
|
||||
@ -183,7 +183,7 @@ u64 GetMurmurHash3(const u8* src, u32 len, u32 samples)
|
||||
//----------
|
||||
// tail
|
||||
|
||||
const u8 * tail = (const u8*)(data + nblocks*16);
|
||||
const u8* tail = (const u8*)(data + nblocks*16);
|
||||
|
||||
u64 k1 = 0;
|
||||
u64 k2 = 0;
|
||||
@ -232,7 +232,7 @@ u64 GetCRC32(const u8* src, u32 len, u32 samples)
|
||||
#if _M_SSE >= 0x402 || defined(_M_ARM_64)
|
||||
u64 h[4] = { len, 0, 0, 0 };
|
||||
u32 Step = (len / 8);
|
||||
const u64* data = (const u64 *)src;
|
||||
const u64* data = (const u64*)src;
|
||||
const u64* end = data + Step;
|
||||
if (samples == 0)
|
||||
samples = std::max(Step, 1u);
|
||||
@ -339,7 +339,7 @@ u64 GetHashHiresTexture(const u8* src, u32 len, u32 samples)
|
||||
u64 h = len * m;
|
||||
const int r = 47;
|
||||
u32 Step = (len / 8);
|
||||
const u64* data = (const u64 *)src;
|
||||
const u64* data = (const u64*)src;
|
||||
const u64* end = data + Step;
|
||||
if (samples == 0)
|
||||
samples = std::max(Step, 1u);
|
||||
@ -408,7 +408,7 @@ u64 GetCRC32(const u8* src, u32 len, u32 samples)
|
||||
// Block read - if your platform needs to do endian-swapping or can only
|
||||
// handle aligned reads, do the conversion here
|
||||
|
||||
inline u32 getblock(const u32 * p, int i)
|
||||
inline u32 getblock(const u32* p, int i)
|
||||
{
|
||||
return p[i];
|
||||
}
|
||||
@ -456,7 +456,7 @@ inline void bmix32(u32 & h1, u32 & h2, u32 & k1, u32 & k2, u32 & c1, u32 & c2)
|
||||
|
||||
u64 GetMurmurHash3(const u8* src, u32 len, u32 samples)
|
||||
{
|
||||
const u8 * data = (const u8*)src;
|
||||
const u8* data = (const u8*)src;
|
||||
u32 out[2];
|
||||
const int nblocks = len / 8;
|
||||
u32 Step = (len / 4);
|
||||
@ -475,7 +475,7 @@ u64 GetMurmurHash3(const u8* src, u32 len, u32 samples)
|
||||
//----------
|
||||
// body
|
||||
|
||||
const u32 * blocks = (const u32 *)(data + nblocks*8);
|
||||
const u32* blocks = (const u32*)(data + nblocks*8);
|
||||
|
||||
for (int i = -nblocks; i < 0; i+=Step)
|
||||
{
|
||||
@ -488,7 +488,7 @@ u64 GetMurmurHash3(const u8* src, u32 len, u32 samples)
|
||||
//----------
|
||||
// tail
|
||||
|
||||
const u8 * tail = (const u8*)(data + nblocks*8);
|
||||
const u8* tail = (const u8*)(data + nblocks*8);
|
||||
|
||||
u32 k1 = 0;
|
||||
u32 k2 = 0;
|
||||
@ -522,7 +522,7 @@ u64 GetMurmurHash3(const u8* src, u32 len, u32 samples)
|
||||
out[0] = h1;
|
||||
out[1] = h2;
|
||||
|
||||
return *((u64 *)&out);
|
||||
return *((u64*)&out);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -536,7 +536,7 @@ u64 GetHashHiresTexture(const u8* src, u32 len, u32 samples)
|
||||
u64 h = len * m;
|
||||
const int r = 47;
|
||||
u32 Step = (len / 8);
|
||||
const u64* data = (const u64 *)src;
|
||||
const u64* data = (const u64*)src;
|
||||
const u64* end = data + Step;
|
||||
if (samples == 0)
|
||||
samples = std::max(Step, 1u);
|
||||
@ -554,7 +554,7 @@ u64 GetHashHiresTexture(const u8* src, u32 len, u32 samples)
|
||||
h *= m;
|
||||
}
|
||||
|
||||
const u8 * data2 = (const u8*)end;
|
||||
const u8* data2 = (const u8*)end;
|
||||
|
||||
switch (len & 7)
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ void GenericLog(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
LogManager *LogManager::m_logManager = nullptr;
|
||||
LogManager* LogManager::m_logManager = nullptr;
|
||||
|
||||
LogManager::LogManager()
|
||||
{
|
||||
@ -118,7 +118,7 @@ void LogManager::Log(LogTypes::LOG_LEVELS level, LogTypes::LOG_TYPE type,
|
||||
const char* file, int line, const char* format, va_list args)
|
||||
{
|
||||
char temp[MAX_MSGLEN];
|
||||
LogContainer *log = m_Log[type];
|
||||
LogContainer* log = m_Log[type];
|
||||
|
||||
if (!log->IsEnabled() || level > log->GetLevel() || !log->HasListeners())
|
||||
return;
|
||||
|
@ -97,7 +97,7 @@ void SetThreadAffinity(std::thread::native_handle_type thread, u32 mask)
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
thread_policy_set(pthread_mach_thread_np(thread),
|
||||
THREAD_AFFINITY_POLICY, (integer_t *)&mask, 1);
|
||||
THREAD_AFFINITY_POLICY, (integer_t*)&mask, 1);
|
||||
#elif (defined __linux__ || defined BSD4_4 || defined __FreeBSD__) && !(defined ANDROID)
|
||||
#ifdef __FreeBSD__
|
||||
cpuset_t cpu_set;
|
||||
|
@ -75,7 +75,7 @@ EvictFindResult<V> EvictFind(std::unordered_map<K, EvictEntry<V>>& map, const K&
|
||||
#if DEBUG
|
||||
printf("failed to find key '");
|
||||
for (size_t i = 0; i < sizeof(key); i++) {
|
||||
printf("%02x", ((u8 *) &key)[i]);
|
||||
printf("%02x", ((u8*) &key)[i]);
|
||||
}
|
||||
printf("'\n");
|
||||
#endif
|
||||
|
@ -35,7 +35,7 @@ bool ApplyPatch(const PatchInfo& patch) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void* patch_addr = (void *)((uintptr_t)module + patch.rva);
|
||||
void* patch_addr = (void*)((uintptr_t)module + patch.rva);
|
||||
size_t patch_size = patch.length;
|
||||
|
||||
DWORD old_protect;
|
||||
|
Loading…
Reference in New Issue
Block a user