From 6db3b87a6caa560577fa1e31d456f19f99cf144b Mon Sep 17 00:00:00 2001 From: Jekyll Wu Date: Tue, 27 Sep 2011 17:13:22 +0800 Subject: [PATCH] Make type decalrations more consistent with other parts Block *var ==> Block* var --- src/BlockArray.cpp | 16 ++++++++-------- src/BlockArray.h | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/BlockArray.cpp b/src/BlockArray.cpp index 95cfe9d8c..41cba44d3 100644 --- a/src/BlockArray.cpp +++ b/src/BlockArray.cpp @@ -57,7 +57,7 @@ BlockArray::~BlockArray() assert(!lastblock); } -size_t BlockArray::append(Block *block) +size_t BlockArray::append(Block* block) { if (!size) return size_t(-1); @@ -128,7 +128,7 @@ const Block* BlockArray::at(size_t i) assert(j < size); unmap(); - Block *block = (Block*)mmap(0, blocksize, PROT_READ, MAP_PRIVATE, ion, j * blocksize); + Block* block = (Block*)mmap(0, blocksize, PROT_READ, MAP_PRIVATE, ion, j * blocksize); if (block == (Block*)-1) { perror("mmap"); return 0; } @@ -206,7 +206,7 @@ bool BlockArray::setHistorySize(size_t newsize) } } -void moveBlock(FILE *fion, int cursor, int newpos, char *buffer2) +void moveBlock(FILE* fion, int cursor, int newpos, char* buffer2) { int res = KDE_fseek(fion, cursor * blocksize, SEEK_SET); if (res) @@ -235,9 +235,9 @@ void BlockArray::decreaseBuffer(size_t newsize) return; // The Block constructor could do somthing in future... - char *buffer1 = new char[blocksize]; + char* buffer1 = new char[blocksize]; - FILE *fion = fdopen(dup(ion), "w+b"); + FILE* fion = fdopen(dup(ion), "w+b"); if (!fion) { delete [] buffer1; perror("fdopen/dup"); @@ -280,8 +280,8 @@ void BlockArray::increaseBuffer() return; // The Block constructor could do somthing in future... - char *buffer1 = new char[blocksize]; - char *buffer2 = new char[blocksize]; + char* buffer1 = new char[blocksize]; + char* buffer2 = new char[blocksize]; int runs = 1; int bpr = size; // blocks per run @@ -291,7 +291,7 @@ void BlockArray::increaseBuffer() runs = offset; } - FILE *fion = fdopen(dup(ion), "w+b"); + FILE* fion = fdopen(dup(ion), "w+b"); if (!fion) { perror("fdopen/dup"); delete [] buffer1; diff --git a/src/BlockArray.h b/src/BlockArray.h index b00334476..c372a693e 100644 --- a/src/BlockArray.h +++ b/src/BlockArray.h @@ -61,7 +61,7 @@ public: * Note, that the block may be dropped completely * if history is turned off. */ - size_t append(Block *block); + size_t append(Block* block); /** * gets the block at the index. Function may return @@ -71,7 +71,7 @@ public: * maped in memory - and will be invalid on the next * operation on this class. */ - const Block *at(size_t index); + const Block* at(size_t index); /** * reorders blocks as needed. If newsize is null, @@ -83,7 +83,7 @@ public: size_t newBlock(); - Block *lastBlock() const; + Block* lastBlock() const; /** * Convenient function to set the size in KBytes @@ -107,9 +107,9 @@ private: size_t current; size_t index; - Block *lastmap; + Block* lastmap; size_t lastmap_index; - Block *lastblock; + Block* lastblock; int ion; size_t length;