summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actorsprite.cpp19
-rw-r--r--src/being.cpp39
-rw-r--r--src/gui/buydialog.cpp24
-rw-r--r--src/gui/charselectdialog.cpp34
-rw-r--r--src/gui/itemamountwindow.cpp36
-rw-r--r--src/gui/quitdialog.cpp20
-rw-r--r--src/gui/quitdialog.h2
-rw-r--r--src/gui/register.cpp30
-rw-r--r--src/gui/selldialog.cpp24
-rw-r--r--src/gui/setup_video.cpp14
-rw-r--r--src/gui/shopwindow.cpp34
-rw-r--r--src/gui/textcommandeditor.cpp56
-rw-r--r--src/gui/tradewindow.cpp16
-rw-r--r--src/gui/updaterwindow.cpp16
-rw-r--r--src/guild.cpp4
-rw-r--r--src/net/messagein.cpp16
-rw-r--r--src/particleemitter.cpp14
-rw-r--r--src/resources/beinginfo.cpp4
-rw-r--r--src/resources/image.cpp6
-rw-r--r--src/resources/itemdb.cpp2
20 files changed, 203 insertions, 207 deletions
diff --git a/src/actorsprite.cpp b/src/actorsprite.cpp
index 2cc138047..082ceda14 100644
--- a/src/actorsprite.cpp
+++ b/src/actorsprite.cpp
@@ -68,7 +68,7 @@ ActorSprite::~ActorSprite()
// Notify listeners of the destruction.
for (ActorSpriteListenerIterator iter = mActorSpriteListeners.begin(),
- end = mActorSpriteListeners.end(); iter != end; ++iter)
+ e = mActorSpriteListeners.end(); iter != e; ++iter)
{
(*iter)->actorSpriteDestroyed(*this);
}
@@ -366,11 +366,12 @@ void ActorSprite::setupSpriteDisplay(const SpriteDisplay &display,
//setup particle effects
if (Particle::enabled && particleEngine)
{
- std::vector<std::string>::const_iterator it, it_end;
- for (it = display.particles.begin(), it_end = display.particles.end();
- it != it_end; ++it)
+ std::vector<std::string>::const_iterator itr, itr_end;
+ for (itr = display.particles.begin(),
+ itr_end = display.particles.end();
+ itr != itr_end; ++itr)
{
- Particle *p = particleEngine->addEffect(*it, 0, 0);
+ Particle *p = particleEngine->addEffect(*itr, 0, 0);
controlParticle(p);
}
}
@@ -435,7 +436,7 @@ static const char *cursorSize(int size)
void ActorSprite::initTargetCursor()
{
- static std::string targetCursor = "graphics/target-cursor-%s-%s.png";
+ static std::string targetCursorFile = "graphics/target-cursor-%s-%s.png";
static int targetWidths[NUM_TC] = {44, 62, 82};
static int targetHeights[NUM_TC] = {35, 44, 60};
@@ -444,9 +445,9 @@ void ActorSprite::initTargetCursor()
{
for (int type = TCT_NORMAL; type < NUM_TCT; type++)
{
- loadTargetCursor(strprintf(targetCursor.c_str(), cursorType(type),
- cursorSize(size)), targetWidths[size],
- targetHeights[size], type, size);
+ loadTargetCursor(strprintf(targetCursorFile.c_str(),
+ cursorType(type), cursorSize(size)), targetWidths[size],
+ targetHeights[size], type, size);
}
}
}
diff --git a/src/being.cpp b/src/being.cpp
index eafc647fc..5381c5924 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -496,13 +496,13 @@ void Being::setSpeech(const std::string &text, int time)
// Check for links
std::string::size_type start = mSpeech.find('[');
- std::string::size_type end = mSpeech.find(']', start);
+ std::string::size_type e = mSpeech.find(']', start);
- while (start != std::string::npos && end != std::string::npos)
+ while (start != std::string::npos && e != std::string::npos)
{
// Catch multiple embeds and ignore them so it doesn't crash the client.
while ((mSpeech.find('[', start + 1) != std::string::npos) &&
- (mSpeech.find('[', start + 1) < end))
+ (mSpeech.find('[', start + 1) < e))
{
start = mSpeech.find('[', start + 1);
}
@@ -510,7 +510,7 @@ void Being::setSpeech(const std::string &text, int time)
std::string::size_type position = mSpeech.find('|');
if (mSpeech[start + 1] == '@' && mSpeech[start + 2] == '@')
{
- mSpeech.erase(end, 1);
+ mSpeech.erase(e, 1);
mSpeech.erase(start, (position - start) + 1);
}
position = mSpeech.find('@');
@@ -522,7 +522,7 @@ void Being::setSpeech(const std::string &text, int time)
}
start = mSpeech.find('[', start + 1);
- end = mSpeech.find(']', start);
+ e = mSpeech.find(']', start);
}
if (!mSpeech.empty())
@@ -1393,17 +1393,16 @@ void Being::drawSpeech(int offsetX, int offsetY)
else if (mSpeechTime > 0 && (speech == NAME_IN_BUBBLE ||
speech == NO_NAME_IN_BUBBLE))
{
- const bool showName = (speech == NAME_IN_BUBBLE);
+ const bool isShowName = (speech == NAME_IN_BUBBLE);
delete mText;
mText = 0;
- mSpeechBubble->setCaption(showName ? mName : "", mTextColor);
+ mSpeechBubble->setCaption(isShowName ? mName : "", mTextColor);
- mSpeechBubble->setText(mSpeech, showName);
+ mSpeechBubble->setText(mSpeech, isShowName);
mSpeechBubble->setPosition(px - (mSpeechBubble->getWidth() / 2),
- py - getHeight()
- - (mSpeechBubble->getHeight()));
+ py - getHeight() - (mSpeechBubble->getHeight()));
mSpeechBubble->setVisible(true);
}
else if (mSpeechTime > 0 && speech == TEXT_OVERHEAD)
@@ -2157,28 +2156,28 @@ void Being::recalcSpritesOrder()
if (spriteToItems)
{
- SpriteToItemMap::const_iterator it;
+ SpriteToItemMap::const_iterator itr;
- for (it = spriteToItems->begin();
- it != spriteToItems->end(); ++it)
+ for (itr = spriteToItems->begin();
+ itr != spriteToItems->end(); ++it)
{
- int removeSprite = it->first;
- const std::map<int, int> &itemReplacer = it->second;
+ int remSprite = itr->first;
+ const std::map<int, int> &itemReplacer = itr->second;
if (itemReplacer.empty())
{
- mSpriteHide[removeSprite] = 1;
+ mSpriteHide[remSprite] = 1;
}
else
{
std::map<int, int>::const_iterator repIt
- = itemReplacer.find(mSpriteIDs[removeSprite]);
+ = itemReplacer.find(mSpriteIDs[remSprite]);
if (repIt != itemReplacer.end())
{
- mSpriteHide[removeSprite] = repIt->second;
+ mSpriteHide[remSprite] = repIt->second;
if (repIt->second != 1)
{
- setSprite(removeSprite, repIt->second,
- mSpriteColors[removeSprite],
+ setSprite(remSprite, repIt->second,
+ mSpriteColors[remSprite],
1, false, true);
}
}
diff --git a/src/gui/buydialog.cpp b/src/gui/buydialog.cpp
index 4a03370a8..94c2b88ff 100644
--- a/src/gui/buydialog.cpp
+++ b/src/gui/buydialog.cpp
@@ -111,18 +111,18 @@ void BuyDialog::init()
mSlider->addActionListener(this);
mShopItemList->addSelectionListener(this);
- ContainerPlacer place;
- place = getPlacer(0, 0);
-
- place(0, 0, mScrollArea, 8, 5).setPadding(3);
- place(0, 5, mDecreaseButton);
- place(1, 5, mSlider, 3);
- place(4, 5, mIncreaseButton);
- place(5, 5, mQuantityLabel, 2);
- place(7, 5, mAddMaxButton);
- place(0, 6, mMoneyLabel, 8);
- place(6, 7, mBuyButton);
- place(7, 7, mQuitButton);
+ ContainerPlacer placer;
+ placer = getPlacer(0, 0);
+
+ placer(0, 0, mScrollArea, 8, 5).setPadding(3);
+ placer(0, 5, mDecreaseButton);
+ placer(1, 5, mSlider, 3);
+ placer(4, 5, mIncreaseButton);
+ placer(5, 5, mQuantityLabel, 2);
+ placer(7, 5, mAddMaxButton);
+ placer(0, 6, mMoneyLabel, 8);
+ placer(6, 7, mBuyButton);
+ placer(7, 7, mQuitButton);
Layout &layout = getLayout();
layout.setRowHeight(0, Layout::AUTO_SET);
diff --git a/src/gui/charselectdialog.cpp b/src/gui/charselectdialog.cpp
index f926a90aa..e39b5ecfc 100644
--- a/src/gui/charselectdialog.cpp
+++ b/src/gui/charselectdialog.cpp
@@ -141,34 +141,34 @@ CharSelectDialog::CharSelectDialog(LoginData *data):
int optionalActions = Net::getLoginHandler()->supportedOptionalActions();
- ContainerPlacer place;
- place = getPlacer(0, 0);
+ ContainerPlacer placer;
+ placer = getPlacer(0, 0);
- place(0, 0, mAccountNameLabel, 2);
- place(0, 1, mSwitchLoginButton);
+ placer(0, 0, mAccountNameLabel, 2);
+ placer(0, 1, mSwitchLoginButton);
if (optionalActions & Net::LoginHandler::Unregister)
{
mUnregisterButton = new Button(_("Unregister"),
"unregister", this);
- place(3, 1, mUnregisterButton);
+ placer(3, 1, mUnregisterButton);
}
- place(0, 2, mChangePasswordButton);
+ placer(0, 2, mChangePasswordButton);
if (optionalActions & Net::LoginHandler::ChangeEmail)
{
mChangeEmailButton = new Button(_("Change Email"),
"change_email", this);
- place(3, 2, mChangeEmailButton);
+ placer(3, 2, mChangeEmailButton);
}
- place = getPlacer(0, 1);
+ placer = getPlacer(0, 1);
for (int i = 0; i < static_cast<int>(mLoginData->characterSlots); i++)
{
mCharacterEntries.push_back(new CharacterDisplay(this));
- place(i % SLOTS_PER_ROW, static_cast<int>(i) / SLOTS_PER_ROW,
+ placer(i % SLOTS_PER_ROW, static_cast<int>(i) / SLOTS_PER_ROW,
mCharacterEntries[i]);
}
@@ -410,14 +410,14 @@ CharacterDisplay::CharacterDisplay(CharSelectDialog *charSelectDialog):
mDelete = new Button(_("Delete"), "delete", charSelectDialog);
LayoutHelper h(this);
- ContainerPlacer place = h.getPlacer(0, 0);
-
- place(0, 0, mPlayerBox, 3, 5);
- place(0, 5, mName, 3);
- place(0, 6, mLevel, 3);
- place(0, 7, mMoney, 3);
- place(0, 8, mButton, 3);
- place(0, 9, mDelete, 3);
+ ContainerPlacer placer = h.getPlacer(0, 0);
+
+ placer(0, 0, mPlayerBox, 3, 5);
+ placer(0, 5, mName, 3);
+ placer(0, 6, mLevel, 3);
+ placer(0, 7, mMoney, 3);
+ placer(0, 8, mButton, 3);
+ placer(0, 9, mDelete, 3);
update();
diff --git a/src/gui/itemamountwindow.cpp b/src/gui/itemamountwindow.cpp
index 9bd3f3ab3..d85b38ccb 100644
--- a/src/gui/itemamountwindow.cpp
+++ b/src/gui/itemamountwindow.cpp
@@ -213,21 +213,21 @@ ItemAmountWindow::ItemAmountWindow(Usage usage, Window *parent, Item *item,
minusAmountButton->setWidth(plusAmountButton->getWidth());
// Set positions
- ContainerPlacer place;
- place = getPlacer(0, 0);
+ ContainerPlacer placer;
+ placer = getPlacer(0, 0);
int n = 0;
if (mUsage == ShopBuyAdd)
{
- place(0, n, mItemDropDown, 8);
+ placer(0, n, mItemDropDown, 8);
n++;
}
- place(1, n, minusAmountButton);
- place(2, n, mItemAmountTextField, 3);
- place(5, n, plusAmountButton);
- place(6, n, addAllButton);
+ placer(1, n, minusAmountButton);
+ placer(2, n, mItemAmountTextField, 3);
+ placer(5, n, plusAmountButton);
+ placer(6, n, addAllButton);
- place(0, n, mItemIcon, 1, 3);
- place(1, n + 1, mItemAmountSlide, 7);
+ placer(0, n, mItemIcon, 1, 3);
+ placer(1, n + 1, mItemAmountSlide, 7);
if (mUsage == ShopBuyAdd || mUsage == ShopSellAdd)
{
@@ -236,19 +236,19 @@ ItemAmountWindow::ItemAmountWindow(Usage usage, Window *parent, Item *item,
minusPriceButton->adjustSize();
minusPriceButton->setWidth(plusPriceButton->getWidth());
- place(1, n + 2, minusPriceButton);
- place(2, n + 2, mItemPriceTextField, 3);
- place(5, n + 2, plusPriceButton);
- place(6, n + 2, mGPLabel);
+ placer(1, n + 2, minusPriceButton);
+ placer(2, n + 2, mItemPriceTextField, 3);
+ placer(5, n + 2, plusPriceButton);
+ placer(6, n + 2, mGPLabel);
- place(1, n + 3, mItemPriceSlide, 7);
- place(4, n + 5, cancelButton);
- place(5, n + 5, okButton);
+ placer(1, n + 3, mItemPriceSlide, 7);
+ placer(4, n + 5, cancelButton);
+ placer(5, n + 5, okButton);
}
else
{
- place(4, n + 2, cancelButton);
- place(5, n + 2, okButton);
+ placer(4, n + 2, cancelButton);
+ placer(5, n + 2, okButton);
}
reflowLayout(225, 0);
diff --git a/src/gui/quitdialog.cpp b/src/gui/quitdialog.cpp
index 96848f645..e71e291d1 100644
--- a/src/gui/quitdialog.cpp
+++ b/src/gui/quitdialog.cpp
@@ -55,7 +55,7 @@ QuitDialog::QuitDialog(QuitDialog** pointerToMe):
addKeyListener(this);
- ContainerPlacer place = getPlacer(0, 0);
+ ContainerPlacer placer = getPlacer(0, 0);
const State state = Client::getState();
@@ -67,25 +67,25 @@ QuitDialog::QuitDialog(QuitDialog** pointerToMe):
state == STATE_UPDATE ||
state == STATE_LOAD_DATA)
{
- placeOption(place, mForceQuit);
+ placeOption(placer, mForceQuit);
}
else
{
// Only added if we are connected to an accountserver or gameserver
- placeOption(place, mLogoutQuit);
- placeOption(place, mSwitchAccountServer);
+ placeOption(placer, mLogoutQuit);
+ placeOption(placer, mSwitchAccountServer);
// Only added if we are connected to a gameserver
if (state == STATE_GAME)
- placeOption(place, mSwitchCharacter);
+ placeOption(placer, mSwitchCharacter);
}
mOptions[0]->setSelected(true);
- place = getPlacer(0, 1);
+ placer = getPlacer(0, 1);
- place(1, 0, mOkButton, 1);
- place(2, 0, mCancelButton, 1);
+ placer(1, 0, mOkButton, 1);
+ placer(2, 0, mCancelButton, 1);
reflowLayout(200, 0);
setLocationRelativeTo(getParent());
@@ -109,9 +109,9 @@ QuitDialog::~QuitDialog()
mSwitchCharacter = 0;
}
-void QuitDialog::placeOption(ContainerPlacer &place, gcn::RadioButton *option)
+void QuitDialog::placeOption(ContainerPlacer &placer, gcn::RadioButton *option)
{
- place(0, static_cast<int>(mOptions.size()), option, 3);
+ placer(0, static_cast<int>(mOptions.size()), option, 3);
mOptions.push_back(option);
}
diff --git a/src/gui/quitdialog.h b/src/gui/quitdialog.h
index 380a85528..5456be26b 100644
--- a/src/gui/quitdialog.h
+++ b/src/gui/quitdialog.h
@@ -61,7 +61,7 @@ class QuitDialog : public Window, public gcn::ActionListener,
void keyPressed(gcn::KeyEvent &keyEvent);
private:
- void placeOption(ContainerPlacer &place, gcn::RadioButton *option);
+ void placeOption(ContainerPlacer &placer, gcn::RadioButton *option);
std::vector<gcn::RadioButton*> mOptions;
gcn::RadioButton *mLogoutQuit;
diff --git a/src/gui/register.cpp b/src/gui/register.cpp
index e2c718359..603810a0b 100644
--- a/src/gui/register.cpp
+++ b/src/gui/register.cpp
@@ -81,15 +81,15 @@ RegisterDialog::RegisterDialog(LoginData *data):
mRegisterButton = new Button(_("Register"), "register", this);
mCancelButton = new Button(_("Cancel"), "cancel", this);
- ContainerPlacer place;
- place = getPlacer(0, 0);
- place(0, 0, userLabel);
- place(0, 1, passwordLabel);
- place(0, 2, confirmLabel);
+ ContainerPlacer placer;
+ placer = getPlacer(0, 0);
+ placer(0, 0, userLabel);
+ placer(0, 1, passwordLabel);
+ placer(0, 2, confirmLabel);
- place(1, 0, mUserField, 3).setPadding(2);
- place(1, 1, mPasswordField, 3).setPadding(2);
- place(1, 2, mConfirmField, 3).setPadding(2);
+ placer(1, 0, mUserField, 3).setPadding(2);
+ placer(1, 1, mPasswordField, 3).setPadding(2);
+ placer(1, 2, mConfirmField, 3).setPadding(2);
int row = 3;
@@ -97,8 +97,8 @@ RegisterDialog::RegisterDialog(LoginData *data):
{
mMaleButton = new RadioButton(_("Male"), "sex", true);
mFemaleButton = new RadioButton(_("Female"), "sex", false);
- place(1, row, mMaleButton);
- place(2, row, mFemaleButton);
+ placer(1, row, mMaleButton);
+ placer(2, row, mFemaleButton);
row++;
}
@@ -107,15 +107,15 @@ RegisterDialog::RegisterDialog(LoginData *data):
{
gcn::Label *emailLabel = new Label(_("Email:"));
mEmailField = new TextField;
- place(0, row, emailLabel);
- place(1, row, mEmailField, 3).setPadding(2);
+ placer(0, row, emailLabel);
+ placer(1, row, mEmailField, 3).setPadding(2);
row++;
}
- place = getPlacer(0, 2);
- place(1, 0, mRegisterButton);
- place(2, 0, mCancelButton);
+ placer = getPlacer(0, 2);
+ placer(1, 0, mRegisterButton);
+ placer(2, 0, mCancelButton);
reflowLayout(250, 0);
mUserField->addKeyListener(this);
diff --git a/src/gui/selldialog.cpp b/src/gui/selldialog.cpp
index 5cbb4167e..82b4a1829 100644
--- a/src/gui/selldialog.cpp
+++ b/src/gui/selldialog.cpp
@@ -107,18 +107,18 @@ void SellDialog::init()
mSlider->setActionEventId("slider");
mSlider->addActionListener(this);
- ContainerPlacer place;
- place = getPlacer(0, 0);
-
- place(0, 0, mScrollArea, 8, 5).setPadding(3);
- place(0, 5, mDecreaseButton);
- place(1, 5, mSlider, 3);
- place(4, 5, mIncreaseButton);
- place(5, 5, mQuantityLabel, 2);
- place(7, 5, mAddMaxButton);
- place(0, 6, mMoneyLabel, 8);
- place(6, 7, mSellButton);
- place(7, 7, mQuitButton);
+ ContainerPlacer placer;
+ placer = getPlacer(0, 0);
+
+ placer(0, 0, mScrollArea, 8, 5).setPadding(3);
+ placer(0, 5, mDecreaseButton);
+ placer(1, 5, mSlider, 3);
+ placer(4, 5, mIncreaseButton);
+ placer(5, 5, mQuantityLabel, 2);
+ placer(7, 5, mAddMaxButton);
+ placer(0, 6, mMoneyLabel, 8);
+ placer(6, 7, mSellButton);
+ placer(7, 7, mQuitButton);
Layout &layout = getLayout();
layout.setRowHeight(0, Layout::AUTO_SET);
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp
index bc210075a..e0f03ec60 100644
--- a/src/gui/setup_video.cpp
+++ b/src/gui/setup_video.cpp
@@ -687,12 +687,12 @@ void Setup_Video::action(const gcn::ActionEvent &event)
}
else if (id == "fpslimitcheckbox" || id == "fpslimitslider")
{
- int fps = static_cast<int>(mFpsSlider->getValue());
+ int tempFps = static_cast<int>(mFpsSlider->getValue());
if (id == "fpslimitcheckbox" && !mFpsSlider->isEnabled())
- fps = 60;
+ tempFps = 60;
else
- fps = fps > 0 ? fps : 60;
- mFps = mFpsCheckBox->isSelected() ? fps : 0;
+ tempFps = tempFps > 0 ? tempFps : 60;
+ mFps = mFpsCheckBox->isSelected() ? tempFps : 0;
const std::string text = mFps > 0 ? toString(mFps) : _("None");
mFpsLabel->setCaption(text);
@@ -701,9 +701,9 @@ void Setup_Video::action(const gcn::ActionEvent &event)
}
else if (id == "altfpslimitslider")
{
- int fps = static_cast<int>(mAltFpsSlider->getValue());
- fps = fps > 0 ? fps : static_cast<int>(mAltFpsSlider->getScaleStart());
- mAltFps = fps;
+ int tempFps = static_cast<int>(mAltFpsSlider->getValue());
+ tempFps = tempFps > 0 ? tempFps : static_cast<int>(mAltFpsSlider->getScaleStart());
+ mAltFps = tempFps;
const std::string text = mAltFps > 0 ? toString(mAltFps) : _("None");
mAltFpsLabel->setCaption(_("Alt FPS limit: ") + text);
diff --git a/src/gui/shopwindow.cpp b/src/gui/shopwindow.cpp
index c62c3254c..ccfed3efc 100644
--- a/src/gui/shopwindow.cpp
+++ b/src/gui/shopwindow.cpp
@@ -127,28 +127,28 @@ ShopWindow::ShopWindow():
mAnnounceLinks = new CheckBox(_("Show links in announce"), false,
this, "link announce");
- ContainerPlacer place;
- place = getPlacer(0, 0);
-
- place(0, 0, mBuyLabel, 8).setPadding(3);
- place(8, 0, mSellLabel, 8).setPadding(3);
- place(0, 1, mBuyScrollArea, 8, 5).setPadding(3);
- place(8, 1, mSellScrollArea, 8, 5).setPadding(3);
- place(0, 6, mBuyAddButton);
- place(1, 6, mBuyDeleteButton);
- place(3, 6, mBuyAnnounceButton);
- place(8, 6, mSellAddButton);
- place(9, 6, mSellDeleteButton);
- place(11, 6, mSellAnnounceButton);
- place(0, 7, mAnnounceLinks, 8);
- place(15, 7, mCloseButton);
+ ContainerPlacer placer;
+ placer = getPlacer(0, 0);
+
+ placer(0, 0, mBuyLabel, 8).setPadding(3);
+ placer(8, 0, mSellLabel, 8).setPadding(3);
+ placer(0, 1, mBuyScrollArea, 8, 5).setPadding(3);
+ placer(8, 1, mSellScrollArea, 8, 5).setPadding(3);
+ placer(0, 6, mBuyAddButton);
+ placer(1, 6, mBuyDeleteButton);
+ placer(3, 6, mBuyAnnounceButton);
+ placer(8, 6, mSellAddButton);
+ placer(9, 6, mSellDeleteButton);
+ placer(11, 6, mSellAnnounceButton);
+ placer(0, 7, mAnnounceLinks, 8);
+ placer(15, 7, mCloseButton);
if (auctionManager && auctionManager->getEnableAuctionBot())
{
mBuyAuctionButton = new Button(_("Auction"), "auction buy", this);
mSellAuctionButton = new Button(_("Auction"), "auction sell", this);
- place(4, 6, mBuyAuctionButton);
- place(12, 6, mSellAuctionButton);
+ placer(4, 6, mBuyAuctionButton);
+ placer(12, 6, mSellAuctionButton);
}
else
{
diff --git a/src/gui/textcommandeditor.cpp b/src/gui/textcommandeditor.cpp
index 1e18da57a..214cbff76 100644
--- a/src/gui/textcommandeditor.cpp
+++ b/src/gui/textcommandeditor.cpp
@@ -254,34 +254,34 @@ TextCommandEditor::TextCommandEditor(TextCommand *command):
mSchoolDropDown->setSelected(command->getSchool() - MAGIC_START_ID);
mSchoolLvlField->setValue(command->getSchoolLvl());
- ContainerPlacer place;
- place = getPlacer(0, 0);
-
- place(0, 0, mIsMagic, 1);
- place(2, 0, mIsOther, 1);
- place(0, 1, mSymbolLabel, 2).setPadding(3);
- place(2, 1, mSymbolTextField, 3).setPadding(3);
- place(0, 2, mCommandLabel, 2).setPadding(3);
- place(2, 2, mCommandTextField, 4).setPadding(3);
- place(0, 3, mTypeLabel, 2).setPadding(3);
- place(2, 3, mTypeDropDown, 3).setPadding(3);
-
- place(0, 4, mIconLabel, 2).setPadding(3);
- place(2, 4, mIconDropDown, 3).setPadding(3);
-
- place(0, 5, mManaLabel, 2).setPadding(3);
- place(2, 5, mManaField, 3).setPadding(3);
- place(0, 6, mMagicLvlLabel, 2).setPadding(3);
- place(2, 6, mMagicLvlField, 3).setPadding(3);
-
- place(0, 7, mSchoolLabel, 2).setPadding(3);
- place(2, 7, mSchoolDropDown, 3).setPadding(3);
- place(0, 8, mSchoolLvlLabel, 2).setPadding(3);
- place(2, 8, mSchoolLvlField, 3).setPadding(3);
-
- place(0, 9, mSaveButton, 2).setPadding(3);
- place(2, 9, mCancelButton, 2).setPadding(3);
- place(4, 9, mDeleteButton, 2).setPadding(3);
+ ContainerPlacer placer;
+ placer = getPlacer(0, 0);
+
+ placer(0, 0, mIsMagic, 1);
+ placer(2, 0, mIsOther, 1);
+ placer(0, 1, mSymbolLabel, 2).setPadding(3);
+ placer(2, 1, mSymbolTextField, 3).setPadding(3);
+ placer(0, 2, mCommandLabel, 2).setPadding(3);
+ placer(2, 2, mCommandTextField, 4).setPadding(3);
+ placer(0, 3, mTypeLabel, 2).setPadding(3);
+ placer(2, 3, mTypeDropDown, 3).setPadding(3);
+
+ placer(0, 4, mIconLabel, 2).setPadding(3);
+ placer(2, 4, mIconDropDown, 3).setPadding(3);
+
+ placer(0, 5, mManaLabel, 2).setPadding(3);
+ placer(2, 5, mManaField, 3).setPadding(3);
+ placer(0, 6, mMagicLvlLabel, 2).setPadding(3);
+ placer(2, 6, mMagicLvlField, 3).setPadding(3);
+
+ placer(0, 7, mSchoolLabel, 2).setPadding(3);
+ placer(2, 7, mSchoolDropDown, 3).setPadding(3);
+ placer(0, 8, mSchoolLvlLabel, 2).setPadding(3);
+ placer(2, 8, mSchoolLvlField, 3).setPadding(3);
+
+ placer(0, 9, mSaveButton, 2).setPadding(3);
+ placer(2, 9, mCancelButton, 2).setPadding(3);
+ placer(4, 9, mDeleteButton, 2).setPadding(3);
setWidth(w);
setHeight(h);
diff --git a/src/gui/tradewindow.cpp b/src/gui/tradewindow.cpp
index d0ae67746..3874a8301 100644
--- a/src/gui/tradewindow.cpp
+++ b/src/gui/tradewindow.cpp
@@ -118,14 +118,14 @@ TradeWindow::TradeWindow():
place(1, 0, mMoneyLabel);
place(0, 1, myScroll).setPadding(3);
place(1, 1, partnerScroll).setPadding(3);
- ContainerPlacer place;
- place = getPlacer(0, 0);
- place(0, 0, mMoneyLabel2);
- place(1, 0, mMoneyField, 2);
- place(3, 0, mMoneyChangeButton).setHAlign(LayoutCell::LEFT);
- place = getPlacer(0, 2);
- place(0, 0, mAddButton);
- place(1, 0, mOkButton);
+ ContainerPlacer placer;
+ placer = getPlacer(0, 0);
+ placer(0, 0, mMoneyLabel2);
+ placer(1, 0, mMoneyField, 2);
+ placer(3, 0, mMoneyChangeButton).setHAlign(LayoutCell::LEFT);
+ placer = getPlacer(0, 2);
+ placer(0, 0, mAddButton);
+ placer(1, 0, mOkButton);
Layout &layout = getLayout();
layout.extend(0, 2, 2, 1);
layout.setRowHeight(1, Layout::AUTO_SET);
diff --git a/src/gui/updaterwindow.cpp b/src/gui/updaterwindow.cpp
index 4ba1c9179..d6c74cc79 100644
--- a/src/gui/updaterwindow.cpp
+++ b/src/gui/updaterwindow.cpp
@@ -165,14 +165,14 @@ UpdaterWindow::UpdaterWindow(const std::string &updateHost,
mBrowserBox->setOpaque(false);
mPlayButton->setEnabled(false);
- ContainerPlacer place;
- place = getPlacer(0, 0);
-
- place(0, 0, mScrollArea, 5, 3).setPadding(3);
- place(0, 3, mLabel, 5);
- place(0, 4, mProgressBar, 5);
- place(3, 5, mCancelButton);
- place(4, 5, mPlayButton);
+ ContainerPlacer placer;
+ placer = getPlacer(0, 0);
+
+ placer(0, 0, mScrollArea, 5, 3).setPadding(3);
+ placer(0, 3, mLabel, 5);
+ placer(0, 4, mProgressBar, 5);
+ placer(3, 5, mCancelButton);
+ placer(4, 5, mPlayButton);
reflowLayout(450, 400);
diff --git a/src/guild.cpp b/src/guild.cpp
index 234c7d32f..a2d9149eb 100644
--- a/src/guild.cpp
+++ b/src/guild.cpp
@@ -170,9 +170,9 @@ void Guild::removeMember(GuildMember *member)
(*itr)->mCharId == member->mCharId &&
(*itr)->getName() == member->getName())
{
- GuildMember *member = *itr;
+ GuildMember *m = *itr;
mMembers.erase(itr);
- delete member;
+ delete m;
return;
}
++itr;
diff --git a/src/net/messagein.cpp b/src/net/messagein.cpp
index 5bfeefdb6..8f177f906 100644
--- a/src/net/messagein.cpp
+++ b/src/net/messagein.cpp
@@ -190,12 +190,11 @@ std::string MessageIn::readString(int length)
char const *stringEnd
= static_cast<char const *>(memchr(stringBeg, '\0', length));
- std::string readString(stringBeg,
- stringEnd ? stringEnd - stringBeg : length);
+ std::string str(stringBeg, stringEnd ? stringEnd - stringBeg : length);
mPos += length;
PacketCounters::incInBytes(length);
- DEBUGLOG("readString: " + readString);
- return readString;
+ DEBUGLOG("readString: " + str);
+ return str;
}
std::string MessageIn::readRawString(int length)
@@ -215,12 +214,11 @@ std::string MessageIn::readRawString(int length)
char const *stringBeg = mData + mPos;
char const *stringEnd
= static_cast<char const *>(memchr(stringBeg, '\0', length));
- std::string readString(stringBeg,
- stringEnd ? stringEnd - stringBeg : length);
+ std::string str(stringBeg, stringEnd ? stringEnd - stringBeg : length);
mPos += length;
PacketCounters::incInBytes(length);
- DEBUGLOG("readString: " + readString);
+ DEBUGLOG("readString: " + str);
if (stringEnd)
{
@@ -234,11 +232,11 @@ std::string MessageIn::readRawString(int length)
{
DEBUGLOG("readString2: " + hiddenPart);
- return readString + "|" + hiddenPart;
+ return str + "|" + hiddenPart;
}
}
- return readString;
+ return str;
}
}
diff --git a/src/particleemitter.cpp b/src/particleemitter.cpp
index fd1f07e16..9cad0864f 100644
--- a/src/particleemitter.cpp
+++ b/src/particleemitter.cpp
@@ -566,9 +566,9 @@ std::list<Particle *> ParticleEmitter::createParticles(int tick)
newParticle->setFollow(mParticleFollow);
newParticle->setDestination(mParticleTarget,
- mParticleAcceleration.value(tick),
- mParticleMomentum.value(tick)
- );
+ mParticleAcceleration.value(tick),
+ mParticleMomentum.value(tick));
+
newParticle->setDieDistance(mParticleDieDistance.value(tick));
newParticle->setLifetime(mParticleLifetime.value(tick));
@@ -577,16 +577,14 @@ std::list<Particle *> ParticleEmitter::createParticles(int tick)
newParticle->setAlpha(mParticleAlpha.value(tick));
for (std::list<ParticleEmitter>::const_iterator
- i = mParticleChildEmitters.begin();
- i != mParticleChildEmitters.end(); ++i)
+ it = mParticleChildEmitters.begin();
+ it != mParticleChildEmitters.end(); ++it)
{
- newParticle->addEmitter(new ParticleEmitter(*i));
+ newParticle->addEmitter(new ParticleEmitter(*it));
}
if (!mDeathEffect.empty())
- {
newParticle->setDeathEffect(mDeathEffect, mDeathEffectConditions);
- }
newParticles.push_back(newParticle);
}
diff --git a/src/resources/beinginfo.cpp b/src/resources/beinginfo.cpp
index 8beea420d..4aa7515b1 100644
--- a/src/resources/beinginfo.cpp
+++ b/src/resources/beinginfo.cpp
@@ -94,10 +94,10 @@ void BeingInfo::addSound(SoundEvent event, const std::string &filename)
const std::string &BeingInfo::getSound(SoundEvent event) const
{
- static std::string empty("");
+ static std::string emptySound("");
SoundEvents::const_iterator i = mSounds.find(event);
- return (i == mSounds.end() || !i->second) ? empty :
+ return (i == mSounds.end() || !i->second) ? emptySound :
i->second->at(rand() % i->second->size());
}
diff --git a/src/resources/image.cpp b/src/resources/image.cpp
index e28cb2bc5..8f5ee1d2d 100644
--- a/src/resources/image.cpp
+++ b/src/resources/image.cpp
@@ -49,12 +49,12 @@ int Image::mTextureSize = 0;
bool Image::mEnableAlphaCache = false;
bool Image::mEnableAlpha = true;
-Image::Image(SDL_Surface *image, bool hasAlphaChannel, Uint8 *alphaChannel):
+Image::Image(SDL_Surface *image, bool hasAlphaChannel0, Uint8 *alphaChannel):
mAlpha(1.0f),
- mHasAlphaChannel(hasAlphaChannel),
+ mHasAlphaChannel(hasAlphaChannel0),
mSDLSurface(image),
mAlphaChannel(alphaChannel),
- mIsAlphaVisible(hasAlphaChannel),
+ mIsAlphaVisible(hasAlphaChannel0),
mIsAlphaCalculated(false)
{
#ifdef USE_OPENGL
diff --git a/src/resources/itemdb.cpp b/src/resources/itemdb.cpp
index 89df407a6..9ff80de22 100644
--- a/src/resources/itemdb.cpp
+++ b/src/resources/itemdb.cpp
@@ -361,7 +361,7 @@ void ItemDB::load()
mItemInfos[id] = itemInfo;
if (!name.empty())
{
- std::string temp = normalize(name);
+ temp = normalize(name);
NamedItemInfos::const_iterator itr = mNamedItemInfos.find(temp);
if (itr == mNamedItemInfos.end())