diff options
author | Jordi Vilalta Prat | 2010-10-12 02:18:11 +0000 |
---|---|---|
committer | Jordi Vilalta Prat | 2010-10-12 02:18:11 +0000 |
commit | 8388e0dfea4ae0d80e51368acd12685c740c5bb5 (patch) | |
tree | f960376a145a830cd77b08264c1412f71ec02f7e /common | |
parent | 43161858ac14bae4ac6dea114d8b3e7a8c1b293b (diff) | |
download | scummvm-rg350-8388e0dfea4ae0d80e51368acd12685c740c5bb5.tar.gz scummvm-rg350-8388e0dfea4ae0d80e51368acd12685c740c5bb5.tar.bz2 scummvm-rg350-8388e0dfea4ae0d80e51368acd12685c740c5bb5.zip |
JANITORAL: Clean trailing whitespaces.
svn-id: r53160
Diffstat (limited to 'common')
-rw-r--r-- | common/array.h | 2 | ||||
-rw-r--r-- | common/scummsys.h | 4 | ||||
-rw-r--r-- | common/stream.cpp | 14 | ||||
-rw-r--r-- | common/stream.h | 2 | ||||
-rw-r--r-- | common/translation.cpp | 23 | ||||
-rw-r--r-- | common/translation.h | 6 | ||||
-rw-r--r-- | common/unzip.cpp | 2 |
7 files changed, 26 insertions, 27 deletions
diff --git a/common/array.h b/common/array.h index 792a5ac5b2..e3aab66dc6 100644 --- a/common/array.h +++ b/common/array.h @@ -150,7 +150,7 @@ public: insert_aux(_storage + idx, &element, &element + 1); } - void insert_at(int idx, const Array<T> &array) { + void insert_at(int idx, const Array<T> &array) { assert(idx >= 0 && (uint)idx <= _size); insert_aux(_storage + idx, array.begin(), array.end()); } diff --git a/common/scummsys.h b/common/scummsys.h index b612c3b34b..3acf3b4b3b 100644 --- a/common/scummsys.h +++ b/common/scummsys.h @@ -243,7 +243,7 @@ #define SCUMM_NEED_ALIGNMENT #endif - // Very BAD hack following, used to avoid triggering an assert in uClibc dingux library + // Very BAD hack following, used to avoid triggering an assert in uClibc dingux library // "toupper" when pressing keyboard function keys. #if defined(DINGUX) #undef toupper @@ -322,7 +322,7 @@ #define SCUMM_LITTLE_ENDIAN #define SCUMM_NEED_ALIGNMENT - + /* to make an efficient, inlined memcpy implementation */ #define memcpy(dst, src, size) psp_memcpy(dst, src, size) diff --git a/common/stream.cpp b/common/stream.cpp index 8f8f278afd..9f8f6127f1 100644 --- a/common/stream.cpp +++ b/common/stream.cpp @@ -286,7 +286,7 @@ uint32 BufferedReadStream::read(void *dataPtr, uint32 dataSize) { // Satisfy the request from the buffer memcpy(dataPtr, _buf + _pos, dataSize); _pos += dataSize; - } + } return alreadyRead + dataSize; } @@ -301,7 +301,7 @@ bool BufferedSeekableReadStream::seek(int32 offset, int whence) { // Note: We could try to handle SEEK_END and SEEK_SET, too, but // since they are rarely used, it seems not worth the effort. _eos = false; // seeking always cancels EOS - + if (whence == SEEK_CUR && (int)_pos + offset >= 0 && _pos + offset <= _bufSize) { _pos += offset; @@ -332,10 +332,10 @@ BufferedWriteStream::BufferedWriteStream(WriteStream *parentStream, uint32 bufSi BufferedWriteStream::~BufferedWriteStream() { assert(flush()); - + if (_disposeParentStream) delete _parentStream; - + delete[] _buf; } @@ -343,7 +343,7 @@ uint32 BufferedWriteStream::write(const void *dataPtr, uint32 dataSize) { // check if we have enough space for writing to the buffer if (_bufSize - _pos >= dataSize) { memcpy(_buf + _pos, dataPtr, dataSize); - _pos += dataSize; + _pos += dataSize; } else if (_bufSize >= dataSize) { // check if we can flush the buffer and load the data // flush the buffer assert(flushBuffer()); @@ -351,7 +351,7 @@ uint32 BufferedWriteStream::write(const void *dataPtr, uint32 dataSize) { _pos += dataSize; } else { // too big for our buffer // flush the buffer - assert(flushBuffer()); + assert(flushBuffer()); return _parentStream->write(dataPtr, dataSize); } return dataSize; @@ -359,7 +359,7 @@ uint32 BufferedWriteStream::write(const void *dataPtr, uint32 dataSize) { bool BufferedWriteStream::flushBuffer() { uint32 bytesToWrite = _pos; - + if (bytesToWrite) { _pos = 0; if (_parentStream->write(_buf, bytesToWrite) != bytesToWrite) diff --git a/common/stream.h b/common/stream.h index 4e627c2b1d..c6605cb42d 100644 --- a/common/stream.h +++ b/common/stream.h @@ -540,7 +540,7 @@ protected: public: BufferedWriteStream(WriteStream *parentStream, uint32 bufSize, DisposeAfterUse::Flag disposeParentStream = DisposeAfterUse::NO); virtual ~BufferedWriteStream(); - + virtual uint32 write(const void *dataPtr, uint32 dataSize); virtual bool flush(); }; diff --git a/common/translation.cpp b/common/translation.cpp index b81deb6058..a33e1a5243 100644 --- a/common/translation.cpp +++ b/common/translation.cpp @@ -270,18 +270,18 @@ bool TranslationManager::openTranslationsFile(File& inFile) { // First try to open it directly (i.e. using the SearchMan). if (inFile.open("translations.dat")) return true; - + // Then look in the Themepath if we can find the file. if (ConfMan.hasKey("themepath")) return openTranslationsFile(FSNode(ConfMan.get("themepath")), inFile); - + return false; } bool TranslationManager::openTranslationsFile(const FSNode &node, File& inFile, int depth) { if (!node.exists() || !node.isReadable() || !node.isDirectory()) return false; - + // Check if we can find the file in this directory // Since File::open(FSNode) makes all the needed tests, it is not really // necessary to make them here. But it avoid printing warnings. @@ -290,21 +290,21 @@ bool TranslationManager::openTranslationsFile(const FSNode &node, File& inFile, if (inFile.open(fileNode)) return true; } - + // Check if we exceeded the given recursion depth if (depth - 1 == -1) - return false; - + return false; + // Otherwise look for it in sub-directories FSList fileList; if (!node.getChildren(fileList, FSNode::kListDirectoriesOnly)) return false; - + for (FSList::iterator i = fileList.begin(); i != fileList.end(); ++i) { if (openTranslationsFile(*i, inFile, depth == -1 ? - 1 : depth - 1)) return true; } - + // Not found in this directory or its sub-directories return false; } @@ -324,7 +324,7 @@ void TranslationManager::loadTranslationsInfoDat() { // Get number of translations int nbTranslations = in.readUint16BE(); - + // Skip all the block sizes for (int i = 0; i < nbTranslations + 2; ++i) in.readUint16BE(); @@ -473,11 +473,11 @@ String TranslationManager::getTranslation(const String &message, const String &) const TLangArray TranslationManager::getSupportedLanguageNames() const { return TLangArray(); } - + const char *TranslationManager::getCurrentCharset() { return "ASCII"; } - + const char *TranslationManager::getCurrentLanguage() { return "C"; } @@ -485,4 +485,3 @@ const char *TranslationManager::getCurrentLanguage() { #endif // USE_TRANSLATION } // End of namespace Common - diff --git a/common/translation.h b/common/translation.h index d6db5d5077..ff0a8a2acf 100644 --- a/common/translation.h +++ b/common/translation.h @@ -116,7 +116,7 @@ public: * it returns the original untranslated message. */ String getTranslation(const String &message); - + /** * Returns the translation into the current language of the parameter * message. In case the message isn't found in the translation catalog, @@ -127,7 +127,7 @@ public: * massage without a context or with a different context. */ const char *getTranslation(const char *message, const char *context); - + /** * Returns the translation into the current language of the parameter * message. In case the message isn't found in the translation catalog, @@ -213,6 +213,6 @@ private: #define _s(str) str #define _sc(str, ctxt) str -#define DECLARE_TRANSLATION_ADDITIONAL_CONTEXT(str, ctxt) +#define DECLARE_TRANSLATION_ADDITIONAL_CONTEXT(str, ctxt) #endif diff --git a/common/unzip.cpp b/common/unzip.cpp index 6df2ed4848..e0ddb8f286 100644 --- a/common/unzip.cpp +++ b/common/unzip.cpp @@ -373,7 +373,7 @@ typedef struct { unz_file_info_internal cur_file_info_internal; /* private info about it*/ } cached_file_in_zip; -typedef Common::HashMap<Common::String, cached_file_in_zip, Common::IgnoreCase_Hash, +typedef Common::HashMap<Common::String, cached_file_in_zip, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> ZipHash; /* unz_s contain internal information about the zipfile |