vfs, ps/game.cpp: lint
dbghelp_funcs: no longer needed, since we load dbghelp statically This was SVN commit r1788.
This commit is contained in:
parent
699b38e350
commit
6ca71568f5
@ -290,7 +290,7 @@ struct ci_char_traits : public std::char_traits<char>
|
||||
{ return tolower(c1) < tolower(c2); }
|
||||
|
||||
static int compare(const char* s1, const char* s2, size_t n)
|
||||
{ return stricmp(s1, s2); }
|
||||
{ return strnicmp(s1, s2, n); }
|
||||
|
||||
static const char* find(const char* s, int n, char a)
|
||||
{
|
||||
@ -322,6 +322,10 @@ struct TLoc
|
||||
archive = _archive;
|
||||
pri = _pri;
|
||||
}
|
||||
|
||||
// no copy ctor, since some members are const
|
||||
private:
|
||||
TLoc& operator=(const TLoc&);
|
||||
};
|
||||
|
||||
|
||||
@ -369,12 +373,15 @@ struct TFile
|
||||
{
|
||||
loc = _loc;
|
||||
|
||||
mtime = 0;
|
||||
size = 0;
|
||||
if(s)
|
||||
mtime = s->st_mtime, size = s->st_size;
|
||||
else
|
||||
mtime = 0, size = 0;
|
||||
{
|
||||
mtime = s->st_mtime;
|
||||
size = s->st_size;
|
||||
}
|
||||
|
||||
pri = _loc->pri;
|
||||
pri = (u16)_loc->pri;
|
||||
in_archive = _loc->archive > 0;
|
||||
|
||||
exact_fn = 0; // safety
|
||||
@ -597,7 +604,7 @@ enum TreeLookupFlags
|
||||
static int tree_lookup_dir(const char* path, TDir** pdir, uint flags = 0, char* exact_path = 0)
|
||||
{
|
||||
CHECK_PATH(path);
|
||||
assert((flags & ~(LF_CREATE_MISSING|LF_START_DIR)) == 0);
|
||||
assert( (flags & ~(LF_CREATE_MISSING|LF_START_DIR)) == 0 );
|
||||
// no undefined bits set
|
||||
// can't check if path ends in '/' here - we're called via tree_lookup.
|
||||
|
||||
@ -1128,7 +1135,8 @@ int vfs_mount(const char* v_mount_point, const char* p_real_path, int flags, uin
|
||||
return -1;
|
||||
}
|
||||
|
||||
mounts.push_back(Mount(v_mount_point, p_real_path, flags, pri));
|
||||
const Mount& new_mount = Mount(v_mount_point, p_real_path, flags, pri);
|
||||
mounts.push_back(new_mount);
|
||||
|
||||
// actually mount the entry
|
||||
Mount& m = mounts.back();
|
||||
@ -1579,7 +1587,8 @@ ssize_t vfs_size(Handle hf)
|
||||
|
||||
// open the file for synchronous or asynchronous IO. write access is
|
||||
// requested via FILE_WRITE flag, and is not possible for files in archives.
|
||||
Handle vfs_open(const char* v_fn, uint file_flags /* = 0 */)
|
||||
// file_flags: default 0
|
||||
Handle vfs_open(const char* v_fn, uint file_flags)
|
||||
{
|
||||
// keeping files open doesn't make sense in most cases (because the
|
||||
// file is used to load resources, which are cached at a higher level).
|
||||
@ -1670,7 +1679,7 @@ static double dt;
|
||||
static double totaldata;
|
||||
void dump()
|
||||
{
|
||||
debug_out("TOTAL TIME IN VFS_IO: %f\nthroughput: %f MB/s\n\n", dt, totaldata/dt/1e6);
|
||||
debug_out("TOTAL TIME IN VFS_IO: %f\nthroughput: %f MiB/s\n\n", dt, totaldata/dt/1e6);
|
||||
}
|
||||
|
||||
static ssize_t vfs_timed_io(const Handle hf, const size_t size, void** p, FileIOCB cb = 0, uintptr_t ctx = 0)
|
||||
@ -1736,7 +1745,7 @@ debug_out("vfs_load v_fn=%s\n", v_fn);
|
||||
// (if we allow File to alloc, have to make sure the Handle references
|
||||
// the actual data address, not that of the padding).
|
||||
{
|
||||
const size_t BLOCK_SIZE = 64*KB;
|
||||
const size_t BLOCK_SIZE = 64*KiB;
|
||||
p = mem_alloc(size, BLOCK_SIZE, 0, &hm);
|
||||
if(!p)
|
||||
goto ret;
|
||||
@ -1832,8 +1841,11 @@ static void IO_dtor(IO* io)
|
||||
// doesn't look possible without controlling the AIO implementation:
|
||||
// when we cancel, we can't prevent the app from calling
|
||||
// aio_result, which would terminate the read.
|
||||
static int IO_reload(IO* io, const char*, Handle)
|
||||
static int IO_reload(IO* io, const char* fn, Handle h)
|
||||
{
|
||||
UNUSED(io);
|
||||
UNUSED(fn);
|
||||
UNUSED(h);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
FUNC(void, SymCleanup, (HANDLE))
|
||||
FUNC(BOOL, SymInitialize, (HANDLE, char*, int))
|
||||
FUNC(DWORD, SymSetOptions, (DWORD))
|
||||
FUNC(DWORD64, SymGetModuleBase64, (HANDLE, DWORD64))
|
||||
FUNC(PVOID, SymFunctionTableAccess64, (HANDLE, DWORD64))
|
||||
FUNC(BOOL, StackWalk64, (DWORD, HANDLE, HANDLE, STACKFRAME64*, void*, PREAD_PROCESS_MEMORY_ROUTINE64, PFUNCTION_TABLE_ACCESS_ROUTINE64, PGET_MODULE_BASE_ROUTINE64, PTRANSLATE_ADDRESS_ROUTINE64))
|
||||
FUNC(BOOL, SymGetLineFromAddr64, (HANDLE, DWORD64, DWORD*, IMAGEHLP_LINE64*))
|
||||
FUNC(IMAGE_NT_HEADERS*, ImageNtHeader, (void*))
|
||||
|
||||
FUNC(BOOL, SymGetTypeInfo, (HANDLE, DWORD64, ULONG, IMAGEHLP_SYMBOL_TYPE_INFO, void*))
|
||||
FUNC(BOOL, SymFromAddr, (HANDLE, DWORD64, DWORD64*, SYMBOL_INFO*))
|
||||
FUNC(ULONG, SymSetContext, (HANDLE, IMAGEHLP_STACK_FRAME*, IMAGEHLP_CONTEXT*))
|
||||
FUNC(BOOL, SymEnumSymbols, (HANDLE, ULONG64, const char*, PSYM_ENUMERATESYMBOLS_CALLBACK, void*))
|
||||
|
||||
FUNC(BOOL, MiniDumpWriteDump, (HANDLE, DWORD, HANDLE, MINIDUMP_TYPE, PMINIDUMP_EXCEPTION_INFORMATION, PMINIDUMP_USER_STREAM_INFORMATION, PMINIDUMP_CALLBACK_INFORMATION))
|
@ -30,7 +30,7 @@ namespace PlayerArray_JS
|
||||
{
|
||||
for (size_t i=pInstance->m_Players.size();i<=index;i++)
|
||||
{
|
||||
CPlayer *pNewPlayer=new CPlayer((int)i);
|
||||
CPlayer *pNewPlayer=new CPlayer((uint)i);
|
||||
pNewPlayer->SetUpdateCallback(pInstance->m_PlayerUpdateCB, pInstance->m_PlayerUpdateCBData);
|
||||
pInstance->m_Players.push_back(pNewPlayer);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user