1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-10-08 23:41:06 +00:00

[vfs #1] Add ttvfs, miniz, and minihttp sources

This commit is contained in:
fgenesis 2012-06-01 17:23:19 +02:00
commit a90f57afb0
36 changed files with 10047 additions and 0 deletions

View file

@ -0,0 +1,32 @@
// VFSBase.cpp - common code for VFSDir and VFSFile
// For conditions of distribution and use, see copyright notice in VFS.h
#include "VFSBase.h"
#include "VFSInternal.h"
#include "VFSTools.h"
VFS_NAMESPACE_START
VFSBase::VFSBase()
: ref(this)
#ifdef VFS_USE_HASHMAP
, _hash(0)
#endif
, _origin(NULL)
{
}
// call this only with a lock held!
void VFSBase::_setName(const char *n)
{
if(!n)
return;
_fullname = FixPath(n);
_name = PathToFileName(_fullname.c_str());
#ifdef VFS_USE_HASHMAP
_hash = STRINGHASH(_name);
#endif
}
VFS_NAMESPACE_END