From 1db7d10787f462430054ba04110a8d4647bdbd0a Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Mon, 9 Feb 2009 22:30:00 +0100 Subject: Mostly whitespace fixes Removed tab characters and trailing spaces and added spaces between "if(", "for(", "while(" and "switch(". --- src/resources/buddylist.cpp | 4 ++-- src/resources/colordb.cpp | 4 ++-- src/resources/colordb.h | 2 +- src/resources/emotedb.cpp | 2 +- src/resources/emotedb.h | 2 +- src/resources/monsterinfo.h | 8 ++++---- src/resources/resourcemanager.h | 5 +++-- 7 files changed, 14 insertions(+), 13 deletions(-) (limited to 'src/resources') diff --git a/src/resources/buddylist.cpp b/src/resources/buddylist.cpp index 541acabe..719ecab1 100644 --- a/src/resources/buddylist.cpp +++ b/src/resources/buddylist.cpp @@ -55,9 +55,9 @@ void BuddyList::loadFile() char *buddy = new char[LEN_MAX_USERNAME]; inputStream.getline(buddy, LEN_MAX_USERNAME); // Ugly ? - if(strcmp(buddy,"")) mBuddylist.push_back(buddy); + if (strcmp(buddy, "")) mBuddylist.push_back(buddy); delete [] buddy; - } while(!inputStream.eof()); + } while (!inputStream.eof()); // Read buddy and close file inputStream.close(); diff --git a/src/resources/colordb.cpp b/src/resources/colordb.cpp index 7456f0e4..61ea4bc0 100644 --- a/src/resources/colordb.cpp +++ b/src/resources/colordb.cpp @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Aethyra; if not, write to the Free Software Foundation, + * along with Aethyra; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -101,7 +101,7 @@ void ColorDB::unload() std::string& ColorDB::get(int id) { - if(!mLoaded) + if (!mLoaded) load(); ColorIterator i = mColors.find(id); diff --git a/src/resources/colordb.h b/src/resources/colordb.h index da36048a..2166abcf 100644 --- a/src/resources/colordb.h +++ b/src/resources/colordb.h @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Aethyra; if not, write to the Free Software Foundation, + * along with Aethyra; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/src/resources/emotedb.cpp b/src/resources/emotedb.cpp index adc1635c..ac41b59c 100644 --- a/src/resources/emotedb.cpp +++ b/src/resources/emotedb.cpp @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Aethyra; if not, write to the Free Software Foundation, + * along with Aethyra; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/src/resources/emotedb.h b/src/resources/emotedb.h index 0962edad..2b9dbbc2 100644 --- a/src/resources/emotedb.h +++ b/src/resources/emotedb.h @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with Aethyra; if not, write to the Free Software Foundation, + * along with Aethyra; if not, write to the Free Software Foundation, * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ diff --git a/src/resources/monsterinfo.h b/src/resources/monsterinfo.h index 75464035..359791fd 100644 --- a/src/resources/monsterinfo.h +++ b/src/resources/monsterinfo.h @@ -67,13 +67,13 @@ class MonsterInfo void addParticleEffect(std::string filename); - const std::string& getName() const + const std::string& getName() const { return mName; } - const std::list& getSprites() const + const std::list& getSprites() const { return mSprites; } - Being::TargetCursorSize getTargetCursorSize() const + Being::TargetCursorSize getTargetCursorSize() const { return mTargetCursorSize; } std::string getSound(MonsterSoundEvent event) const; @@ -83,7 +83,7 @@ class MonsterInfo void addAttackParticleEffect(const std::string &particleEffect) { mAttackParticle = particleEffect; } - const std::list& getParticleEffects() const + const std::list& getParticleEffects() const { return mParticleEffects; } private: diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h index 7996e816..3a97c05f 100644 --- a/src/resources/resourcemanager.h +++ b/src/resources/resourcemanager.h @@ -98,8 +98,9 @@ class ResourceManager bool isDirectory(const std::string &path); /** - * Returns the real path to a file - * + * Returns the real path to a file. Note that this method will always + * return a path, it does not check whether the file exists. + * * @param file The file to get the real path to. * @return The real path. */ -- cgit v1.2.3-70-g09d2