take namespace enum out of namespace and added CheckNumForAnyName and CheckNumForFullNameInFile to clarify the meaning of CheckNumForFullName.
This is to take some renaming noise out of the upcoming refactoring.
This commit is contained in:
parent
ba2800d698
commit
634a646c2d
51 changed files with 118 additions and 122 deletions
|
|
@ -58,8 +58,6 @@
|
|||
#include "vm.h"
|
||||
#include "i_interface.h"
|
||||
|
||||
using namespace FileSys;
|
||||
|
||||
extern DObject *WP_NOCHANGE;
|
||||
bool save_full = false; // for testing. Should be removed afterward.
|
||||
|
||||
|
|
@ -155,13 +153,13 @@ bool FSerializer::OpenReader(const char *buffer, size_t length)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
bool FSerializer::OpenReader(FCompressedBuffer *input)
|
||||
bool FSerializer::OpenReader(FileSys::FCompressedBuffer *input)
|
||||
{
|
||||
if (input->mSize <= 0 || input->mBuffer == nullptr) return false;
|
||||
if (w != nullptr || r != nullptr) return false;
|
||||
|
||||
mErrors = 0;
|
||||
if (input->mMethod == METHOD_STORED)
|
||||
if (input->mMethod == FileSys::METHOD_STORED)
|
||||
{
|
||||
r = new FReader((char*)input->mBuffer, input->mSize);
|
||||
}
|
||||
|
|
@ -785,10 +783,10 @@ const char *FSerializer::GetOutput(unsigned *len)
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
FCompressedBuffer FSerializer::GetCompressedOutput()
|
||||
FileSys::FCompressedBuffer FSerializer::GetCompressedOutput()
|
||||
{
|
||||
if (isReading()) return{ 0,0,0,0,0,nullptr };
|
||||
FCompressedBuffer buff;
|
||||
FileSys::FCompressedBuffer buff;
|
||||
WriteObjects();
|
||||
EndObject();
|
||||
buff.filename = nullptr;
|
||||
|
|
@ -827,7 +825,7 @@ FCompressedBuffer FSerializer::GetCompressedOutput()
|
|||
if (err == Z_OK)
|
||||
{
|
||||
buff.mBuffer = new char[buff.mCompressedSize];
|
||||
buff.mMethod = METHOD_DEFLATE;
|
||||
buff.mMethod = FileSys::METHOD_DEFLATE;
|
||||
memcpy(buff.mBuffer, compressbuf, buff.mCompressedSize);
|
||||
delete[] compressbuf;
|
||||
return buff;
|
||||
|
|
@ -836,7 +834,7 @@ FCompressedBuffer FSerializer::GetCompressedOutput()
|
|||
error:
|
||||
memcpy(compressbuf, w->mOutString.GetString(), buff.mSize + 1);
|
||||
buff.mCompressedSize = buff.mSize;
|
||||
buff.mMethod = METHOD_STORED;
|
||||
buff.mMethod = FileSys::METHOD_STORED;
|
||||
return buff;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue