summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-09-14 02:11:55 +0300
committerAndrei Karas <akaras@inbox.ru>2011-09-14 02:11:55 +0300
commit06dccbaa3d581aa3790ecc1d7b9c2385e16c9c20 (patch)
treec884e11767b57bfaffd0643324d146dbdfe16a8b /src
parentc0a5fffb45f849e224750f27fa8c3be5ac447ad6 (diff)
downloadplus-06dccbaa3d581aa3790ecc1d7b9c2385e16c9c20.tar.gz
plus-06dccbaa3d581aa3790ecc1d7b9c2385e16c9c20.tar.bz2
plus-06dccbaa3d581aa3790ecc1d7b9c2385e16c9c20.tar.xz
plus-06dccbaa3d581aa3790ecc1d7b9c2385e16c9c20.zip
Add more checks and some code cleanups.
Diffstat (limited to 'src')
-rw-r--r--src/spellmanager.cpp2
-rw-r--r--src/spellshortcut.cpp2
-rw-r--r--src/text.h6
-rw-r--r--src/textcommand.cpp2
-rw-r--r--src/units.cpp4
5 files changed, 9 insertions, 7 deletions
diff --git a/src/spellmanager.cpp b/src/spellmanager.cpp
index 9f777f9e4..895ac94f2 100644
--- a/src/spellmanager.cpp
+++ b/src/spellmanager.cpp
@@ -41,7 +41,6 @@
SpellManager::SpellManager()
{
- //fillSpells();
load();
}
@@ -50,7 +49,6 @@ SpellManager::~SpellManager()
delete_all(mSpells);
mSpells.clear();
mSpellsVector.clear();
-// save();
}
TextCommand* SpellManager::getSpell(int spellId)
diff --git a/src/spellshortcut.cpp b/src/spellshortcut.cpp
index 2c5bd253d..67171524c 100644
--- a/src/spellshortcut.cpp
+++ b/src/spellshortcut.cpp
@@ -72,4 +72,4 @@ void SpellShortcut::load()
unsigned int SpellShortcut::getSpellsCount() const
{
return SPELL_SHORTCUT_ITEMS;
-} \ No newline at end of file
+}
diff --git a/src/text.h b/src/text.h
index 5249be967..2b0eaa97b 100644
--- a/src/text.h
+++ b/src/text.h
@@ -95,12 +95,14 @@ class FlashText : public Text
/**
* Remove the text from the screen
*/
- virtual ~FlashText() {}
+ virtual ~FlashText()
+ { }
/**
* Flash the text for so many refreshes.
*/
- void flash(int time) {mTime = time; }
+ void flash(int time)
+ { mTime = time; }
/**
* Draws the text.
diff --git a/src/textcommand.cpp b/src/textcommand.cpp
index 33dff85aa..1402576d1 100644
--- a/src/textcommand.cpp
+++ b/src/textcommand.cpp
@@ -112,4 +112,4 @@ void TextCommand::loadImage()
if (!mImage)
mImage = Theme::getImageFromTheme("unknown-item.png");
-} \ No newline at end of file
+}
diff --git a/src/units.cpp b/src/units.cpp
index db9faadd1..edf9c749a 100644
--- a/src/units.cpp
+++ b/src/units.cpp
@@ -208,8 +208,10 @@ std::string formatUnit(int value, int type)
ul = ud.levels[i];
if (ul.count)
+ {
nextAmount = levelAmount / ul.count;
- levelAmount %= ul.count;
+ levelAmount %= ul.count;
+ }
if (levelAmount > 0) output = strprintf("%d%s",
levelAmount, pl.symbol.c_str()) + output;