summaryrefslogtreecommitdiff
path: root/src/gui/widgets/tab.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-03-05 23:13:55 -0700
committerIra Rice <irarice@gmail.com>2009-03-05 23:13:55 -0700
commitaa4229cbb9f2b264ca96c3beedc66b1c79ccc1f5 (patch)
tree19c5a75a766b7df51ae468fb6b8fdbcfd2c6cc72 /src/gui/widgets/tab.cpp
parent93e45964f3b7a0735984616f622ec32b40a21781 (diff)
downloadmana-aa4229cbb9f2b264ca96c3beedc66b1c79ccc1f5.tar.gz
mana-aa4229cbb9f2b264ca96c3beedc66b1c79ccc1f5.tar.bz2
mana-aa4229cbb9f2b264ca96c3beedc66b1c79ccc1f5.tar.xz
mana-aa4229cbb9f2b264ca96c3beedc66b1c79ccc1f5.zip
Made some optimizations based on some profiling done by Octalot, as well
as some other optimizations that I could see that cut down on some unneeded redraws, which in turn improved frame rates slightly. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/widgets/tab.cpp')
-rw-r--r--src/gui/widgets/tab.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/widgets/tab.cpp b/src/gui/widgets/tab.cpp
index 263e5bbd..97f6010c 100644
--- a/src/gui/widgets/tab.cpp
+++ b/src/gui/widgets/tab.cpp
@@ -36,7 +36,7 @@
int Tab::mInstances = 0;
float Tab::mAlpha = config.getValue("guialpha", 0.8);
-enum{
+enum {
TAB_STANDARD, // 0
TAB_HIGHLIGHTED, // 1
TAB_SELECTED, // 2
@@ -95,8 +95,10 @@ void Tab::init()
{
tab[mode] = resman->getImage(data[mode].file);
a = 0;
- for (y = 0; y < 3; y++) {
- for (x = 0; x < 3; x++) {
+ for (y = 0; y < 3; y++)
+ {
+ for (x = 0; x < 3; x++)
+ {
tabImg[mode].grid[a] = tab[mode]->getSubImage(
data[x].gridX, data[y].gridY,
data[x + 1].gridX - data[x].gridX + 1,