8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 21:23:03 +01:00
This commit is contained in:
aafemt 2006-06-29 09:06:32 +00:00
parent e770c91925
commit 8ba3a7acf8
5 changed files with 16 additions and 16 deletions

View File

@ -238,9 +238,9 @@ void TempFile::seek(offset_t offset)
#if defined(WIN_NT)
LARGE_INTEGER liOffset;
liOffset.QuadPart = offset;
const DWORD seek = SetFilePointer(handle, (LONG) liOffset.LowPart,
const DWORD seek_result = SetFilePointer(handle, (LONG) liOffset.LowPart,
&liOffset.HighPart, FILE_BEGIN);
if (seek == INVALID_SET_FILE_POINTER && GetLastError() != NO_ERROR)
if (seek_result == INVALID_SET_FILE_POINTER && GetLastError() != NO_ERROR)
{
Firebird::system_call_failed::raise("SetFilePointer");
}

View File

@ -32,15 +32,15 @@ public:
TempFile(MemoryPool& pool,
const Firebird::PathName& prefix,
const Firebird::PathName& directory,
bool unlink = true)
: filename(pool), position(0), size(0), doUnlink(unlink)
bool unlink_now = true)
: filename(pool), position(0), size(0), doUnlink(unlink_now)
{
init(directory, prefix);
}
TempFile(const Firebird::PathName& prefix,
bool unlink = true)
: position(0), size(0), doUnlink(unlink)
bool unlink_now = true)
: position(0), size(0), doUnlink(unlink_now)
{
init("", prefix);
}

View File

@ -54,9 +54,9 @@ using namespace Firebird;
struct ExternalInfo
{
ExternalInfo(const PathName& moduleName, const string& name)
ExternalInfo(const PathName& moduleName, const string& a_name)
: moduleName(moduleName),
name(name)
name(a_name)
{
}

View File

@ -73,7 +73,7 @@ size_t TempSpace::MemoryBlock::read(size_t offset, void* buffer, size_t length)
{
length = size - offset;
}
memcpy(buffer, (char*) ptr + offset, length);
memcpy(buffer, ptr + offset, length);
return length;
}
@ -83,7 +83,7 @@ size_t TempSpace::MemoryBlock::write(size_t offset, void* buffer, size_t length)
{
length = size - offset;
}
memcpy((char*) ptr + offset, buffer, length);
memcpy(ptr + offset, buffer, length);
return length;
}
@ -129,17 +129,17 @@ size_t TempSpace::FileBlock::write(size_t offset, void* buffer, size_t length)
//
TempSpace::TempSpace(MemoryPool& p, const Firebird::PathName& prefix)
: pool(p), tempFiles(p),
head(NULL), tail(NULL), filePrefix(p, prefix),
logicalSize(0), physicalSize(0), localCacheUsage(0)
: pool(p), filePrefix(p, prefix),
logicalSize(0), physicalSize(0), localCacheUsage(0),
head(NULL), tail(NULL), tempFiles(p)
{
if (!tempDirs)
{
Firebird::MutexLockGuard guard(initMutex);
if (!tempDirs)
{
MemoryPool& p = *getDefaultMemoryPool();
tempDirs = FB_NEW(p) Firebird::TempDirectoryList(p);
MemoryPool& def_pool = *getDefaultMemoryPool();
tempDirs = FB_NEW(def_pool) Firebird::TempDirectoryList(def_pool);
minBlockSize = Config::getTempBlockSize();
}
}

View File

@ -71,7 +71,7 @@ private:
size_t write(size_t, void*, size_t);
private:
void* ptr;
char* ptr;
};
class FileBlock : public Block {