diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-05-10 11:50:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-05-10 11:50:29 +0300 |
commit | 201376c3f5858ab5432cf849d5474e037c071393 (patch) | |
tree | 6d564d943c0b58bf31cc35a41159601c98bfcbb8 | |
parent | 03879469c21e64aa2c8a8fe5c5102ce1a7ed1629 (diff) | |
download | ManaVerse-201376c3f5858ab5432cf849d5474e037c071393.tar.gz ManaVerse-201376c3f5858ab5432cf849d5474e037c071393.tar.bz2 ManaVerse-201376c3f5858ab5432cf849d5474e037c071393.tar.xz ManaVerse-201376c3f5858ab5432cf849d5474e037c071393.zip |
fix code style.
-rw-r--r-- | src/beingcacheentry.h | 2 | ||||
-rw-r--r-- | src/commands.cpp | 2 | ||||
-rw-r--r-- | src/graphicsmanager.cpp | 1 | ||||
-rw-r--r-- | src/gui/charselectdialog.cpp | 2 | ||||
-rw-r--r-- | src/gui/chatwindow.cpp | 2 | ||||
-rw-r--r-- | src/gui/chatwindow.h | 7 | ||||
-rw-r--r-- | src/gui/widgets/browserbox.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/characterviewnormal.cpp | 5 | ||||
-rw-r--r-- | src/gui/widgets/checkbox.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/emoteshortcutcontainer.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/itemshortcutcontainer.cpp | 4 | ||||
-rw-r--r-- | src/gui/widgets/spellshortcutcontainer.cpp | 2 |
12 files changed, 19 insertions, 16 deletions
diff --git a/src/beingcacheentry.h b/src/beingcacheentry.h index 3b5b81f5b..7fe7dd943 100644 --- a/src/beingcacheentry.h +++ b/src/beingcacheentry.h @@ -23,6 +23,8 @@ #include "localconsts.h" +#include <string> + class BeingCacheEntry final { public: diff --git a/src/commands.cpp b/src/commands.cpp index e2e93fe3e..2421e63f4 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -1155,7 +1155,7 @@ impHandler0(testsdlfont) timespec time2; NullOpenGLGraphics *nullGraphics = new NullOpenGLGraphics; std::vector<std::string> data; - int width = 0; + volatile int width = 0; for (int f = 0; f < 300; f ++) data.push_back("test " + toString(f) + "string"); diff --git a/src/graphicsmanager.cpp b/src/graphicsmanager.cpp index f9df9570e..7628b19fc 100644 --- a/src/graphicsmanager.cpp +++ b/src/graphicsmanager.cpp @@ -32,7 +32,6 @@ #include "GL/glx.h" #endif #else -//#include <winuser.h> #endif #endif diff --git a/src/gui/charselectdialog.cpp b/src/gui/charselectdialog.cpp index a48193457..6ac0dd3fe 100644 --- a/src/gui/charselectdialog.cpp +++ b/src/gui/charselectdialog.cpp @@ -255,7 +255,7 @@ void CharSelectDialog::action(const gcn::ActionEvent &event) character->data.mAttributes[PlayerInfo::EXP], Units::formatCurrency( character->data.mAttributes[PlayerInfo::MONEY]).c_str()); - new OkDialog(data->getName().c_str(), msg.c_str(), DIALOG_SILENCE); + new OkDialog(data->getName(), msg, DIALOG_SILENCE); } } if (eventId == "switch") diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp index 7d19ec180..19555e90d 100644 --- a/src/gui/chatwindow.cpp +++ b/src/gui/chatwindow.cpp @@ -714,7 +714,7 @@ void ChatWindow::mouseDragged(gcn::MouseEvent &event) } } -#define caseKey(key,str) case key:\ +#define caseKey(key, str) case key:\ temp = str; \ break diff --git a/src/gui/chatwindow.h b/src/gui/chatwindow.h index 0fa8363f0..39ca8ede9 100644 --- a/src/gui/chatwindow.h +++ b/src/gui/chatwindow.h @@ -244,9 +244,10 @@ class ChatWindow final : public Window, const bool ignoreRecord, const bool tryRemoveColors); - static void battleChatLog(const std::string &line, Own own = BY_UNKNOWN, - const bool ignoreRecord = false, - const bool tryRemoveColors = true); + static void battleChatLog(const std::string &line, + Own own = BY_UNKNOWN, + const bool ignoreRecord = false, + const bool tryRemoveColors = true); void updateOnline(std::set<std::string> &onlinePlayers) const; diff --git a/src/gui/widgets/browserbox.cpp b/src/gui/widgets/browserbox.cpp index 946205660..603c79825 100644 --- a/src/gui/widgets/browserbox.cpp +++ b/src/gui/widgets/browserbox.cpp @@ -719,7 +719,7 @@ int BrowserBox::calcHeight() } if (static_cast<signed>(wWidth) != maxWidth) { - wWidth = maxWidth; +// wWidth = maxWidth; setWidth(maxWidth); } diff --git a/src/gui/widgets/characterviewnormal.cpp b/src/gui/widgets/characterviewnormal.cpp index 11b630099..8d9e136c3 100644 --- a/src/gui/widgets/characterviewnormal.cpp +++ b/src/gui/widgets/characterviewnormal.cpp @@ -28,8 +28,9 @@ #include "debug.h" CharacterViewNormal::CharacterViewNormal(CharSelectDialog *const widget, - std::vector<CharacterDisplay*> *const entries, - const int padding) : + std::vector<CharacterDisplay*> + *const entries, + const int padding) : CharacterViewBase(widget, padding), mSelectedEntry(nullptr), mCharacterEntries(entries) diff --git a/src/gui/widgets/checkbox.cpp b/src/gui/widgets/checkbox.cpp index 552eb98fb..552d98c72 100644 --- a/src/gui/widgets/checkbox.cpp +++ b/src/gui/widgets/checkbox.cpp @@ -48,7 +48,8 @@ CheckBox::CheckBox(const Widget2 *const widget, mPadding(0), mImagePadding(0), mImageSize(9), - mSpacing(2) + mSpacing(2), + mForegroundColor(getThemeColor(Theme::CHECKBOX_OUTLINE)) { if (instances == 0) { @@ -68,7 +69,6 @@ CheckBox::CheckBox(const Widget2 *const widget, addActionListener(listener); mForegroundColor = getThemeColor(Theme::CHECKBOX); - mForegroundColor2 = getThemeColor(Theme::CHECKBOX_OUTLINE); if (mSkin) { mPadding = mSkin->getPadding(); diff --git a/src/gui/widgets/emoteshortcutcontainer.cpp b/src/gui/widgets/emoteshortcutcontainer.cpp index 086a19ef0..89dd6656f 100644 --- a/src/gui/widgets/emoteshortcutcontainer.cpp +++ b/src/gui/widgets/emoteshortcutcontainer.cpp @@ -49,6 +49,7 @@ EmoteShortcutContainer::EmoteShortcutContainer(): ShortcutContainer(), mEmoteImg(), mEmotePopup(new TextPopup), + mForegroundColor2(getThemeColor(Theme::TEXT_OUTLINE)), mEmoteClicked(false), mEmoteMoved(0) { @@ -82,7 +83,6 @@ EmoteShortcutContainer::EmoteShortcutContainer(): mBoxWidth = 1; } mForegroundColor = getThemeColor(Theme::TEXT); - mForegroundColor2 = getThemeColor(Theme::TEXT_OUTLINE); } EmoteShortcutContainer::~EmoteShortcutContainer() diff --git a/src/gui/widgets/itemshortcutcontainer.cpp b/src/gui/widgets/itemshortcutcontainer.cpp index 4ece1c853..ff36d8805 100644 --- a/src/gui/widgets/itemshortcutcontainer.cpp +++ b/src/gui/widgets/itemshortcutcontainer.cpp @@ -55,7 +55,8 @@ ItemShortcutContainer::ItemShortcutContainer(const unsigned number) : mEquipedColor(getThemeColor(Theme::ITEM_EQUIPPED)), mEquipedColor2(getThemeColor(Theme::ITEM_EQUIPPED_OUTLINE)), mUnEquipedColor(getThemeColor(Theme::ITEM_NOT_EQUIPPED)), - mUnEquipedColor2(getThemeColor(Theme::ITEM_NOT_EQUIPPED_OUTLINE)) + mUnEquipedColor2(getThemeColor(Theme::ITEM_NOT_EQUIPPED_OUTLINE)), + mForegroundColor2(getThemeColor(Theme::TEXT_OUTLINE)) { addMouseListener(this); addWidgetListener(this); @@ -79,7 +80,6 @@ ItemShortcutContainer::ItemShortcutContainer(const unsigned number) : mBoxWidth = 1; } mForegroundColor = getThemeColor(Theme::TEXT); - mForegroundColor2 = getThemeColor(Theme::TEXT_OUTLINE); } ItemShortcutContainer::~ItemShortcutContainer() diff --git a/src/gui/widgets/spellshortcutcontainer.cpp b/src/gui/widgets/spellshortcutcontainer.cpp index f03f1d4ca..78c3cec23 100644 --- a/src/gui/widgets/spellshortcutcontainer.cpp +++ b/src/gui/widgets/spellshortcutcontainer.cpp @@ -49,6 +49,7 @@ SpellShortcutContainer::SpellShortcutContainer(const unsigned number) : mSpellMoved(nullptr), mSpellPopup(new SpellPopup), mNumber(number), + mForegroundColor2(getThemeColor(Theme::TEXT_OUTLINE)), mSpellClicked(false) { addMouseListener(this); @@ -73,7 +74,6 @@ SpellShortcutContainer::SpellShortcutContainer(const unsigned number) : mBoxWidth = 1; } mForegroundColor = getThemeColor(Theme::TEXT); - mForegroundColor2 = getThemeColor(Theme::TEXT_OUTLINE); } SpellShortcutContainer::~SpellShortcutContainer() |