aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMax Horn2005-05-05 15:59:24 +0000
committerMax Horn2005-05-05 15:59:24 +0000
commitd00117ec4bdc0b8c79854ba8e9fbd50ecb4acda9 (patch)
tree554ca00f5a8cb13cfae3b6f3b74181754a910af8 /common
parentc16cceafad7aa370cacf6598b2fac24bf8337794 (diff)
downloadscummvm-rg350-d00117ec4bdc0b8c79854ba8e9fbd50ecb4acda9.tar.gz
scummvm-rg350-d00117ec4bdc0b8c79854ba8e9fbd50ecb4acda9.tar.bz2
scummvm-rg350-d00117ec4bdc0b8c79854ba8e9fbd50ecb4acda9.zip
Fixed some doxygen warnings
svn-id: r17923
Diffstat (limited to 'common')
-rw-r--r--common/savefile.cpp16
-rw-r--r--common/stream.h52
2 files changed, 34 insertions, 34 deletions
diff --git a/common/savefile.cpp b/common/savefile.cpp
index aa6e54b9f1..8f24db7686 100644
--- a/common/savefile.cpp
+++ b/common/savefile.cpp
@@ -79,11 +79,11 @@ public:
bool isOpen() const { return fh != 0; }
- uint32 read(void *buf, uint32 cnt) {
- return ::fread(buf, 1, cnt, fh);
+ uint32 read(void *dataPtr, uint32 dataSize) {
+ return ::fread(dataPtr, 1, dataSize, fh);
}
- uint32 write(const void *buf, uint32 cnt) {
- return ::fwrite(buf, 1, cnt, fh);
+ uint32 write(const void *dataPtr, uint32 dataSize) {
+ return ::fwrite(dataPtr, 1, dataSize, fh);
}
};
@@ -109,13 +109,13 @@ public:
bool isOpen() const { return fh != 0; }
- uint32 read(void *buf, uint32 cnt) {
- int ret = ::gzread(fh, buf, cnt);
+ uint32 read(void *dataPtr, uint32 dataSize) {
+ int ret = ::gzread(fh, dataPtr, dataSize);
if (ret <= -1)
_ioError = true;
return ret;
}
- uint32 write(const void *buf, uint32 cnt) {
+ uint32 write(const void *dataPtr, uint32 dataSize) {
// Due to a "bug" in the zlib headers (or maybe I should say,
// a bug in the C++ spec? Whatever <g>) we have to be a bit
// hackish here and remove the const qualifier.
@@ -123,7 +123,7 @@ public:
// which you might think is the same as "const void *" but it
// is not - rather it is equal to "void const *" which is the
// same as "void *". Hrmpf
- int ret = ::gzwrite(fh, const_cast<void *>(buf), cnt);
+ int ret = ::gzwrite(fh, const_cast<void *>(dataPtr), dataSize);
if (ret <= 0)
_ioError = true;
return ret;
diff --git a/common/stream.h b/common/stream.h
index 86287e482f..b9b64bbfd7 100644
--- a/common/stream.h
+++ b/common/stream.h
@@ -60,11 +60,11 @@ public:
* Write data into the stream. Subclasses must implement this
* method; all other write methods are implemented using it.
*
- * @param ptr pointer to the data to be written
- * @param size number of bytes to be written
+ * @param dataPtr pointer to the data to be written
+ * @param dataSize number of bytes to be written
* @return the number of bytes which were actually written.
*/
- virtual uint32 write(const void *ptr, uint32 size) = 0;
+ virtual uint32 write(const void *dataPtr, uint32 dataSize) = 0;
// The remaining methods all have default implementations; subclasses
@@ -132,11 +132,11 @@ public:
* Read data from the stream. Subclasses must implement this
* method; all other read methods are implemented using it.
*
- * @param ptr pointer to a buffer into which the data is read
- * @param size number of bytes to be read
+ * @param dataPtr pointer to a buffer into which the data is read
+ * @param dataSize number of bytes to be read
* @return the number of bytes which were actually read.
*/
- virtual uint32 read(void *ptr, uint32 size) = 0;
+ virtual uint32 read(void *dataPtr, uint32 dataSize) = 0;
// The remaining methods all have default implementations; subclasses
@@ -215,7 +215,7 @@ public:
* This method is a rough analog of the (f)gets function.
*
* @param buf the buffer to store into
- * @param size the size of the buffer
+ * @param bufSize the size of the buffer
* @return a pointer to the read string, or NULL if an error occured
* @note The line terminator (CR or CR/LF) is stripped and not inserted
* into the buffer.
@@ -245,11 +245,11 @@ public:
virtual bool ioFailed() const { return _realStream->ioFailed(); }
virtual void clearIOFailed() { _realStream->clearIOFailed(); }
- uint32 read(void *ptr, uint32 size) {
+ uint32 read(void *dataPtr, uint32 dataSize) {
assert(_realStream);
- uint32 len = _realStream->read(ptr, size);
+ uint32 len = _realStream->read(dataPtr, dataSize);
if (_encbyte) {
- byte *p = (byte *)ptr;
+ byte *p = (byte *)dataPtr;
byte *end = p + len;
while (p < end)
*p++ ^= _encbyte;
@@ -275,23 +275,23 @@ public:
void setEnc(byte value) { _encbyte = value; }
- uint32 read(void *ptr, uint32 len) {
+ uint32 read(void *dataPtr, uint32 dataSize) {
// Read at most as many bytes as are still available...
- if (len > _bufSize - _pos)
- len = _bufSize - _pos;
- memcpy(ptr, _ptr, len);
+ if (dataSize > _bufSize - _pos)
+ dataSize = _bufSize - _pos;
+ memcpy(dataPtr, _ptr, dataSize);
if (_encbyte) {
- byte *p = (byte *)ptr;
- byte *end = p + len;
+ byte *p = (byte *)dataPtr;
+ byte *end = p + dataSize;
while (p < end)
*p++ ^= _encbyte;
}
- _ptr += len;
- _pos += len;
+ _ptr += dataSize;
+ _pos += dataSize;
- return len;
+ return dataSize;
}
bool eos() const { return _pos == _bufSize; }
@@ -314,14 +314,14 @@ private:
public:
MemoryWriteStream(byte *buf, uint32 len) : _ptr(buf), _ptrOrig(buf), _bufSize(len), _pos(0) {}
- uint32 write(const void *ptr, uint32 len) {
+ uint32 write(const void *dataPtr, uint32 dataSize) {
// Write at most as many bytes as are still available...
- if (len > _bufSize - _pos)
- len = _bufSize - _pos;
- memcpy(_ptr, ptr, len);
- _ptr += len;
- _pos += len;
- return len;
+ if (dataSize > _bufSize - _pos)
+ dataSize = _bufSize - _pos;
+ memcpy(_ptr, dataPtr, dataSize);
+ _ptr += dataSize;
+ _pos += dataSize;
+ return dataSize;
}
bool eos() const { return _pos == _bufSize; }