diff options
author | Jordi Vilalta Prat | 2008-01-27 19:47:41 +0000 |
---|---|---|
committer | Jordi Vilalta Prat | 2008-01-27 19:47:41 +0000 |
commit | 66e9d4f5e8f35b28f8abd9ce53a0da4da3ce8985 (patch) | |
tree | e27aadabecd8dd910884280e6559ff9c94c3d73c /common | |
parent | 278857698dc7b1623096fe1ad12511dc4c886c7e (diff) | |
download | scummvm-rg350-66e9d4f5e8f35b28f8abd9ce53a0da4da3ce8985.tar.gz scummvm-rg350-66e9d4f5e8f35b28f8abd9ce53a0da4da3ce8985.tar.bz2 scummvm-rg350-66e9d4f5e8f35b28f8abd9ce53a0da4da3ce8985.zip |
Removed trailing spaces.
svn-id: r30664
Diffstat (limited to 'common')
-rw-r--r-- | common/config-manager.cpp | 2 | ||||
-rw-r--r-- | common/config-manager.h | 6 | ||||
-rw-r--r-- | common/endian.h | 2 | ||||
-rw-r--r-- | common/events.h | 14 | ||||
-rw-r--r-- | common/file.cpp | 28 | ||||
-rw-r--r-- | common/fs.cpp | 2 | ||||
-rw-r--r-- | common/fs.h | 50 | ||||
-rw-r--r-- | common/func.h | 2 | ||||
-rw-r--r-- | common/hashmap.h | 2 | ||||
-rw-r--r-- | common/keyboard.h | 6 | ||||
-rw-r--r-- | common/list.h | 18 | ||||
-rw-r--r-- | common/md5.cpp | 4 | ||||
-rw-r--r-- | common/md5.h | 2 | ||||
-rw-r--r-- | common/module.mk | 2 | ||||
-rw-r--r-- | common/savefile.h | 6 | ||||
-rw-r--r-- | common/str.h | 14 | ||||
-rw-r--r-- | common/system.h | 14 | ||||
-rw-r--r-- | common/util.h | 10 |
18 files changed, 92 insertions, 92 deletions
diff --git a/common/config-manager.cpp b/common/config-manager.cpp index 59fd27bc0a..ef2a01bba6 100644 --- a/common/config-manager.cpp +++ b/common/config-manager.cpp @@ -138,7 +138,7 @@ void ConfigManager::loadDefaultConfigFile() { #elif defined(PALMOS_MODE) strcpy(configFile,"/PALM/Programs/ScummVM/" DEFAULT_CONFIG_FILE); #elif defined(IPHONE) - strcpy(configFile,"/var/root/" DEFAULT_CONFIG_FILE); + strcpy(configFile,"/var/root/" DEFAULT_CONFIG_FILE); #elif defined(__PLAYSTATION2__) ((OSystem_PS2*)g_system)->makeConfigPath(configFile); #elif defined(__PSP__) diff --git a/common/config-manager.h b/common/config-manager.h index 79f56c5bca..bebb59b539 100644 --- a/common/config-manager.h +++ b/common/config-manager.h @@ -77,7 +77,7 @@ public: #else static const char *kApplicationDomain; static const char *kTransientDomain; - + const String _emptyString; #endif @@ -97,7 +97,7 @@ public: // Generic access methods: No domain specified, use the values from the // various domains in the order of their priority. // - + bool hasKey(const String &key) const; const String & get(const String &key) const; void set(const String &key, const String &value); @@ -143,7 +143,7 @@ public: void renameGameDomain(const String &oldName, const String &newName); bool hasGameDomain(const String &domName) const; const DomainMap & getGameDomains() const { return _gameDomains; } - + /* TODO: Callback/change notification system typedef void (*ConfigCallback)(const ConstString &key, void *refCon); diff --git a/common/endian.h b/common/endian.h index 685af27a17..c889371a2f 100644 --- a/common/endian.h +++ b/common/endian.h @@ -58,7 +58,7 @@ FORCEINLINE uint16 SWAP_BYTES_16(uint16 a) { * * Why is this necessary? The C/C++ standard does not define the endianess to * be used for character constants. Hence if one uses multi-byte character - * constants, a potential portability problem opens up. + * constants, a potential portability problem opens up. * * Fortunately, a semi-standard has been established: On almost all systems * and compilers, multi-byte character constants are encoded using the big diff --git a/common/events.h b/common/events.h index d4b8134bc6..6e6485f184 100644 --- a/common/events.h +++ b/common/events.h @@ -129,7 +129,7 @@ class EventManager : NonCopyable { public: EventManager() {} virtual ~EventManager() {} - + enum { LBUTTON = 1 << 0, RBUTTON = 1 << 1 @@ -144,19 +144,19 @@ public: /** Register random source so it can be serialized in game test purposes **/ virtual void registerRandomSource(Common::RandomSource &rnd, const char *name) = 0; - + virtual void processMillis(uint32 &millis) = 0; - + /** Return the current key state */ virtual Common::Point getMousePos() const = 0; - + /** * Return a bitmask with the button states: * - bit 0: left button up=1, down=0 * - bit 1: right button up=1, down=0 */ virtual int getButtonState() const = 0; - + /** Get a bitmask with the current modifier state */ virtual int getModifierState() const = 0; @@ -165,12 +165,12 @@ public: * received an EVENT_QUIT. */ virtual int shouldQuit() const = 0; - + // Optional: check whether a given key is currently pressed ???? //virtual bool isKeyPressed(int keycode) = 0; // TODO: Keyboard repeat support? - + // TODO: Consider removing OSystem::getScreenChangeID and // replacing it by a generic getScreenChangeID method here }; diff --git a/common/file.cpp b/common/file.cpp index 3f0c13ba39..3ddd3d2cc5 100644 --- a/common/file.cpp +++ b/common/file.cpp @@ -66,8 +66,8 @@ // all of these to my own code. // // A #define is the only way, as redefinig the functions would cause linker errors. - - // These functions need to be #undef'ed, as their original definition + + // These functions need to be #undef'ed, as their original definition // in devkitarm is done with #includes (ugh!) #undef feof #undef clearerr @@ -75,7 +75,7 @@ //#undef ferror #include "backends/fs/ds/ds-fs.h" - + //void std_fprintf(FILE* handle, const char* fmt, ...); // used in common/util.cpp //void std_fflush(FILE* handle); // used in common/util.cpp @@ -85,7 +85,7 @@ //char* std_getcwd(char* dir, int dunno); // not used //void std_cwd(char* dir); // not used //int std_ferror(FILE* handle); // not used - + // Only functions used in the ScummVM source have been defined here! #define fopen(name, mode) DS::std_fopen(name, mode) #define fclose(handle) DS::std_fclose(handle) @@ -111,9 +111,9 @@ #ifdef __SYMBIAN32__ #undef feof #undef clearerr - + #define FILE void - + FILE* symbian_fopen(const char* name, const char* mode); void symbian_fclose(FILE* handle); size_t symbian_fread(const void* ptr, size_t size, size_t numItems, FILE* handle); @@ -230,7 +230,7 @@ void File::addDefaultDirectoryRecursive(const FilesystemNode &dir, int level, co FSList fslist; if (!dir.getChildren(fslist, FilesystemNode::kListAll)) { - // Failed listing the contents of this node, so it is either not a + // Failed listing the contents of this node, so it is either not a // directory, or just doesn't exist at all. return; } @@ -265,7 +265,7 @@ void File::addDefaultDirectoryRecursive(const FilesystemNode &dir, int level, co void File::resetDefaultDirectories() { delete _defaultDirectories; delete _filesMap; - + _defaultDirectories = 0; _filesMap = 0; } @@ -417,27 +417,27 @@ bool File::exists(const String &filename) { FilesystemNode file(filename); if (file.exists()) return !file.isDirectory(); - + // See if the file is already mapped if (_filesMap && _filesMap->contains(filename)) { FilesystemNode file2((*_filesMap)[filename]); - + if (file2.exists()) return !file2.isDirectory(); } - + // Try all default directories if (_defaultDirectories) { StringIntMap::const_iterator i(_defaultDirectories->begin()); for (; i != _defaultDirectories->end(); ++i) { FilesystemNode file2(i->_key + filename); - + if(file2.exists()) return !file2.isDirectory(); } } - - //Try opening the file inside the local directory as a last resort + + //Try opening the file inside the local directory as a last resort File tmp; return tmp.open(filename, kFileReadMode); } diff --git a/common/fs.cpp b/common/fs.cpp index 2a8000378a..1c93d82b2b 100644 --- a/common/fs.cpp +++ b/common/fs.cpp @@ -180,7 +180,7 @@ bool FilesystemNode::lookupFile(FSList &results, const Common::String &p, bool h Common::String pattern = p; pattern.toUppercase(); - + // First match all files on this level getChildren(children, FilesystemNode::kListAll, hidden); for (FSList::iterator entry = children.begin(); entry != children.end(); ++entry) { diff --git a/common/fs.h b/common/fs.h index 8356f7b441..b287280ca4 100644 --- a/common/fs.h +++ b/common/fs.h @@ -62,8 +62,8 @@ class FSList : public Common::Array<FilesystemNode> {}; * paths (MacOS 9 doesn't even have the notion of a "current directory"). * And if we ever want to support devices with no FS in the classical sense (Palm...), * we can build upon this. - * - * This class acts as a wrapper around the AbstractFilesystemNode class defined in backends/fs. + * + * This class acts as a wrapper around the AbstractFilesystemNode class defined in backends/fs. */ class FilesystemNode { private: @@ -83,7 +83,7 @@ public: /** * Create a new pathless FilesystemNode. Since there's no path associated - * with this node, path-related operations (i.e. exists(), isDirectory(), + * with this node, path-related operations (i.e. exists(), isDirectory(), * getPath()) will always return false or raise an assertion. */ FilesystemNode(); @@ -103,7 +103,7 @@ public: * Copy constructor. */ FilesystemNode(const FilesystemNode &node); - + /** * Destructor. */ @@ -113,7 +113,7 @@ public: * Copy operator. */ FilesystemNode &operator= (const FilesystemNode &node); - + /** * Compare the name of this node to the name of another. Directories * go before normal files. @@ -122,7 +122,7 @@ public: /** * Indicates whether the object referred by this path exists in the filesystem or not. - * + * * @return bool true if the path exists, false otherwise. */ virtual bool exists() const; @@ -133,20 +133,20 @@ public: * If no child node with the given name exists, an invalid node is returned. */ FilesystemNode getChild(const Common::String &name) const; - + /** * Return a list of child nodes of this directory node. If called on a node * that does not represent a directory, false is returned. - * + * * @return true if succesful, false otherwise (e.g. when the directory does not exist). */ - virtual bool getChildren(FSList &fslist, ListMode mode = kListDirectoriesOnly, bool hidden = false) const; + virtual bool getChildren(FSList &fslist, ListMode mode = kListDirectoriesOnly, bool hidden = false) const; /** * Return a human readable string for this node, usable for display (e.g. * in the GUI code). Do *not* rely on it being usable for anything else, * like constructing paths! - * + * * @return the display name */ virtual Common::String getDisplayName() const; @@ -173,7 +173,7 @@ public: * @return the 'path' represented by this filesystem node */ virtual Common::String getPath() const; - + /** * Get the parent node of this node. If this node has no parent node, * then it returns a duplicate of this node. @@ -182,7 +182,7 @@ public: /** * Indicates whether the path refers to a directory or not. - * + * * @todo Currently we assume that a node that is not a directory * automatically is a file (ignoring things like symlinks or pipes). * That might actually be OK... but we could still add an isFile method. @@ -190,29 +190,29 @@ public: * kDirNodeType, kFileNodeType, kInvalidNodeType. */ virtual bool isDirectory() const; - + /** * Indicates whether the object referred by this path can be read from or not. - * - * If the path refers to a directory, readability implies being able to read + * + * If the path refers to a directory, readability implies being able to read * and list the directory entries. - * - * If the path refers to a file, readability implies being able to read the + * + * If the path refers to a file, readability implies being able to read the * contents of the file. - * + * * @return bool true if the object can be read, false otherwise. */ virtual bool isReadable() const; - + /** * Indicates whether the object referred by this path can be written to or not. - * + * * If the path refers to a directory, writability implies being able to modify * the directory entry (i.e. rename the directory, remove it or write files inside of it). - * + * * If the path refers to a file, writability implies being able to write data * to the file. - * + * * @return bool true if the object can be written to, false otherwise. */ virtual bool isWritable() const; @@ -221,16 +221,16 @@ public: * Searches recursively for files matching the specified pattern inside this directory and * all its subdirectories. It is safe to call this method for non-directories, in this case * it will just return false. - * + * * The files in each directory are scanned first. Other than that, a depth first search * is performed. - * + * * @param results List to put the matches in. * @param pattern Pattern of the files to look for. * @param hidden Whether to search hidden files or not. * @param exhaustive Whether to continue searching after one match has been found. * @param depth How many levels to search through (-1 = search all subdirs, 0 = only the current one) - * + * * @return true if matches could be found, false otherwise. */ virtual bool lookupFile(FSList &results, const Common::String &pattern, bool hidden, bool exhaustive, int depth = -1) const; diff --git a/common/func.h b/common/func.h index a424fcf205..c262c149c6 100644 --- a/common/func.h +++ b/common/func.h @@ -94,7 +94,7 @@ private: Result (*_func)(Arg); public: typedef Result (*FuncType)(Arg); - + PointerToUnaryFunc(const FuncType &func) : _func(func) {} Result operator()(Arg v) const { return _func(v); diff --git a/common/hashmap.h b/common/hashmap.h index f78447ace4..ac4295307b 100644 --- a/common/hashmap.h +++ b/common/hashmap.h @@ -173,7 +173,7 @@ public: * This is almost completely identical to the normal iterator class, only * with some const keywords added here and there, plus a conversion * operator which makes it possible to transparently convert iterators to - * const iterators. + * const iterators. * It is sadly not really possible to reduce this code duplication using * template, unless one is willing to accept various warnings on certain * compilers. Note that many (most? all?) implementations of the standard diff --git a/common/keyboard.h b/common/keyboard.h index d0d0e43f00..93579cbed6 100644 --- a/common/keyboard.h +++ b/common/keyboard.h @@ -170,7 +170,7 @@ enum KeyCode { KEYCODE_MODE = 313, // "Alt Gr" key KEYCODE_COMPOSE = 314, // Multi-key compose key - // Miscellaneous function keys + // Miscellaneous function keys KEYCODE_HELP = 315, KEYCODE_PRINT = 316, KEYCODE_SYSREQ = 317, @@ -248,13 +248,13 @@ struct KeyState { * @see KBD_CTRL, KBD_ALT, KBD_SHIFT */ byte flags; - + KeyState(KeyCode kc = KEYCODE_INVALID, uint16 asc = 0, byte f = 0) { keycode = kc; ascii = asc ? asc : (uint16)kc; flags = f; } - + void reset() { keycode = KEYCODE_INVALID; ascii = flags = 0; diff --git a/common/list.h b/common/list.h index 4ece453711..08b964eddf 100644 --- a/common/list.h +++ b/common/list.h @@ -31,7 +31,7 @@ namespace Common { /** * Simple double linked list, modeled after the list template of the standard - * C++ library. + * C++ library. */ template <class t_T> class List { @@ -44,11 +44,11 @@ public: NodeBase *_prev; NodeBase *_next; }; - + template <class t_T2> struct Node : public NodeBase { t_T2 _data; - + Node(const t_T2 &x) : _data(x) {} }; @@ -101,11 +101,11 @@ public: t_T2* operator->() const { return &(operator*()); } - + bool operator==(const Iterator<t_T2>& x) const { return _node == x._node; } - + bool operator!=(const Iterator<t_T2>& x) const { return _node != x._node; } @@ -148,7 +148,7 @@ public: void insert(iterator pos, const t_T& element) { NodeBase *newNode = new Node<t_T>(element); - + newNode->_next = pos._node; newNode->_prev = pos._node->_prev; newNode->_prev->_next = newNode; @@ -216,7 +216,7 @@ public: else erase(i, end()); } - + return *this; } @@ -230,8 +230,8 @@ public: void clear() { erase(begin(), end()); } - - bool empty() const { + + bool empty() const { return (_anchor == _anchor->_next); } diff --git a/common/md5.cpp b/common/md5.cpp index fee18f25d0..edce9d8e4e 100644 --- a/common/md5.cpp +++ b/common/md5.cpp @@ -268,10 +268,10 @@ bool md5_file(const char *name, uint8 digest[16], uint32 length) { warning("md5_file couldn't open '%s'", name); return false; } - + return md5_file(f, digest, length); } - + bool md5_file(ReadStream &stream, uint8 digest[16], uint32 length) { diff --git a/common/md5.h b/common/md5.h index 578c363e8c..e7879dc6df 100644 --- a/common/md5.h +++ b/common/md5.h @@ -35,7 +35,7 @@ bool md5_file(const char *name, uint8 digest[16], uint32 length = 0); bool md5_file(const FilesystemNode &file, uint8 digest[16], uint32 length = 0); bool md5_file(ReadStream &stream, uint8 digest[16], uint32 length = 0); -// The following two methods work similar to the above two, but +// The following two methods work similar to the above two, but // instead of computing the binary MD5 digest, they produce // a human readable lowercase hexstring representing the digest. // The md5str parameter must point to a buffer of 32+1 chars. diff --git a/common/module.mk b/common/module.mk index 237753458a..bd3e9f21a0 100644 --- a/common/module.mk +++ b/common/module.mk @@ -16,5 +16,5 @@ MODULE_OBJS := \ unzip.o \ zlib.o -# Include common rules +# Include common rules include $(srcdir)/rules.mk diff --git a/common/savefile.h b/common/savefile.h index 5b06248aa8..630765ab4b 100644 --- a/common/savefile.h +++ b/common/savefile.h @@ -109,15 +109,15 @@ public: * @return A string describing the last error. */ virtual String getErrorDesc() { return _errorDesc; } - + /** * Returns the last ocurred error description. If none ocurred, returns 0. * Also clears the last error state and description. - * + * * @return A string describing the last error. */ virtual String popErrorDesc(); - + /** * Open the file with name filename in the given directory for saving. * @param filename the filename diff --git a/common/str.h b/common/str.h index 55ff94c51c..f19ad4e606 100644 --- a/common/str.h +++ b/common/str.h @@ -34,7 +34,7 @@ namespace Common { * Simple string class for ScummVM. Provides automatic storage managment, * and overloads several operators in a 'natural' fashion, mimicking * the std::string class. Even provides simple iterators. - * + * * This class tries to avoid allocating lots of small blocks on the heap, * since that is inefficient on several platforms supported by ScummVM. * Instead, small strings are stored 'inside' the string object (i.e. on @@ -62,14 +62,14 @@ protected: * on purpose :-). */ uint32 _len; - + /** * Pointer to the actual string storage. Either points to _storage, * or to a block allocated on the heap via malloc. */ char *_str; - - + + union { /** * Internal string storage. @@ -84,11 +84,11 @@ protected: uint32 _capacity; } _extern; }; - + inline bool isStorageIntern() const { return _str == _storage; } - + public: #if !(defined(PALMOS_ARM) || defined(PALMOS_DEBUG) || defined(__GP32__)) static const String emptyString; @@ -131,7 +131,7 @@ public: bool hasSuffix(const char *x) const; bool hasPrefix(const char *x) const; - + bool contains(const char *x) const; inline const char *c_str() const { return _str; } diff --git a/common/system.h b/common/system.h index 70e814e9e5..44726fe05c 100644 --- a/common/system.h +++ b/common/system.h @@ -164,7 +164,7 @@ public: * phone-like keypad temporarily unmap all user actions which leads to * comfortable word entry. Conversely, when the dialog exits the feature * is set to false. - * TODO: Fingolfin suggests that the way the feature is used can be + * TODO: Fingolfin suggests that the way the feature is used can be * generalized in this sense: Have a keyboard mapping feature, which the * engine queries for to assign keys to actions ("Here's my default key * map for these actions, what do you want them set to?"). @@ -511,11 +511,11 @@ public: * @note This is currently used in the SCUMM, QUEEN and KYRA engines. */ virtual void setShakePos(int shakeOffset) = 0; - + /** * Sets the area of the screen that has the focus. For example, when a character * is speaking, they will have the focus. Allows for pan-and-scan style views - * where the backend could follow the speaking character or area of interest on + * where the backend could follow the speaking character or area of interest on * the screen. * * The backend is responsible for clipping the rectangle and deciding how best to @@ -523,9 +523,9 @@ public: * * @param rect A rectangle on the screen to be focused on * @see clearFocusRectangle - */ + */ virtual void setFocusRectangle(const Common::Rect& rect) {} - + /** * Clears the focus set by a call to setFocusRectangle(). This allows the engine * to clear the focus during times when no particular area of the screen has the @@ -724,7 +724,7 @@ public: /** Delay/sleep for the specified amount of milliseconds. */ virtual void delayMillis(uint msecs) = 0; - + /** Get the current time and date. Correspond to time()+localtime(). */ virtual void getTimeAndDate(struct tm &t) const; @@ -904,7 +904,7 @@ public: /** * Return String which is used for backend-specific addition to theme * config. - * + * * Typical usage is to disable unneeded GUI widgets or defining * theme-specific tab. */ diff --git a/common/util.h b/common/util.h index e7abd19544..979f98bf4c 100644 --- a/common/util.h +++ b/common/util.h @@ -55,21 +55,21 @@ namespace Common { /** * Simple DOS-style pattern matching function (understands * and ? like used in DOS). * Taken from exult/files/listfiles.cc - * + * * Token meaning: * "*": any character, any amount of times. * "?": any character, only once. - * + * * Example strings/patterns: * String: monkey.s?? Pattern: monkey.s01 => true * String: monkey.s?? Pattern: monkey.s101 => false * String: monkey.s?1 Pattern: monkey.s99 => false * String: monkey.s* Pattern: monkey.s101 => true * String: monkey.s*1 Pattern: monkey.s99 => false - * + * * @param str Text to be matched against the given pattern. * @param pat Glob pattern. - * + * * @return true if str matches the pattern, false otherwise. */ bool matchString(const char *str, const char *pat); @@ -94,7 +94,7 @@ private: public: RandomSource(); void setSeed(uint32 seed); - + uint32 getSeed() { return _randSeed; } |