summaryrefslogtreecommitdiff
path: root/src/gui/popups
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-07-14 01:31:22 +0300
committerAndrei Karas <akaras@inbox.ru>2017-07-14 01:31:22 +0300
commit311c175f3184103950c72bc5c775174597430b83 (patch)
treead022dc44a1c4177b3d53bf0d7eaa5a1736c8cf1 /src/gui/popups
parent16bcb81b0509725e4546bcb3c390ca3c1bb7e7b1 (diff)
downloadplus-311c175f3184103950c72bc5c775174597430b83.tar.gz
plus-311c175f3184103950c72bc5c775174597430b83.tar.bz2
plus-311c175f3184103950c72bc5c775174597430b83.tar.xz
plus-311c175f3184103950c72bc5c775174597430b83.zip
Replace std::vector into macro STD_VECTOR.
In most case it equal to std::vector except debug modes. Now it can be also mse::mstd::vector, but sadly this class not support all required features.
Diffstat (limited to 'src/gui/popups')
-rw-r--r--src/gui/popups/beingpopup.cpp6
-rw-r--r--src/gui/popups/beingpopup.h2
-rw-r--r--src/gui/popups/itempopup.cpp4
-rw-r--r--src/gui/popups/popupmenu.cpp22
-rw-r--r--src/gui/popups/popupmenu.h2
5 files changed, 18 insertions, 18 deletions
diff --git a/src/gui/popups/beingpopup.cpp b/src/gui/popups/beingpopup.cpp
index 251848ed8..299683f6d 100644
--- a/src/gui/popups/beingpopup.cpp
+++ b/src/gui/popups/beingpopup.cpp
@@ -67,7 +67,7 @@ void BeingPopup::postInit()
{
Popup::postInit();
add(mBeingName);
- FOR_EACH (std::vector<Label*>::iterator, it, mLabels)
+ FOR_EACH (STD_VECTOR<Label*>::iterator, it, mLabels)
{
add(*it);
}
@@ -124,7 +124,7 @@ void BeingPopup::show(const int x, const int y, Being *const b)
}
mBeingName->adjustSize();
- FOR_EACH (std::vector<Label*>::iterator, it, mLabels)
+ FOR_EACH (STD_VECTOR<Label*>::iterator, it, mLabels)
{
(*it)->setCaption(std::string());
}
@@ -311,7 +311,7 @@ void BeingPopup::show(const int x, const int y, Being *const b)
int minWidth = mBeingName->getWidth();
const int height1 = getFont()->getHeight();
int height = height1;
- FOR_EACH (std::vector<Label*>::iterator, it, mLabels)
+ FOR_EACH (STD_VECTOR<Label*>::iterator, it, mLabels)
{
const Label *const label = *it;
if (label != nullptr)
diff --git a/src/gui/popups/beingpopup.h b/src/gui/popups/beingpopup.h
index 8c218da2a..a14f44568 100644
--- a/src/gui/popups/beingpopup.h
+++ b/src/gui/popups/beingpopup.h
@@ -60,7 +60,7 @@ class BeingPopup final : public Popup
void addLabels(const int fontHeight);
Label *mBeingName A_NONNULLPOINTER;
- std::vector<Label*> mLabels;
+ STD_VECTOR<Label*> mLabels;
};
extern BeingPopup *beingPopup;
diff --git a/src/gui/popups/itempopup.cpp b/src/gui/popups/itempopup.cpp
index 5179627e1..eedead83d 100644
--- a/src/gui/popups/itempopup.cpp
+++ b/src/gui/popups/itempopup.cpp
@@ -382,12 +382,12 @@ std::string ItemPopup::getOptionsString(const ItemOptionsList *const options)
const ItemOption &option = options->get(f);
if (option.index == 0)
continue;
- const std::vector<ItemFieldType*> &fields = ItemOptionDb::getFields(
+ const STD_VECTOR<ItemFieldType*> &fields = ItemOptionDb::getFields(
option.index);
if (fields.empty())
continue;
const std::string valueStr = toString(option.value);
- FOR_EACH (std::vector<ItemFieldType*>::const_iterator, it, fields)
+ FOR_EACH (STD_VECTOR<ItemFieldType*>::const_iterator, it, fields)
{
const ItemFieldType *const field = *it;
std::string value = valueStr;
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index 2f2df70c3..8b11b0c2f 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -460,8 +460,8 @@ bool PopupMenu::addBeingMenu()
if (info == nullptr)
return false;
- const std::vector<BeingMenuItem> &menu = info->getMenu();
- FOR_EACH (std::vector<BeingMenuItem>::const_iterator, it, menu)
+ const STD_VECTOR<BeingMenuItem> &menu = info->getMenu();
+ FOR_EACH (STD_VECTOR<BeingMenuItem>::const_iterator, it, menu)
{
const BeingMenuItem &item = *it;
mBrowserBox->addRow("/" + item.command, item.name.c_str());
@@ -499,14 +499,14 @@ void PopupMenu::setMousePos2()
}
void PopupMenu::showPopup(const int x, const int y,
- const std::vector<ActorSprite*> &beings)
+ const STD_VECTOR<ActorSprite*> &beings)
{
mX = x;
mY = y;
mBrowserBox->clearRows();
// TRANSLATORS: popup menu header
mBrowserBox->addRow(_("Players"));
- FOR_EACH (std::vector<ActorSprite*>::const_iterator, it, beings)
+ FOR_EACH (STD_VECTOR<ActorSprite*>::const_iterator, it, beings)
{
const Being *const being = dynamic_cast<const Being*>(*it);
const ActorSprite *const actor = *it;
@@ -1806,8 +1806,8 @@ void PopupMenu::showPopup(const int x, const int y, Button *const button)
mY = y;
mBrowserBox->clearRows();
- std::vector<Button *> names = windowMenu->getButtons();
- for (std::vector<Button *>::const_iterator it = names.begin(),
+ STD_VECTOR<Button *> names = windowMenu->getButtons();
+ for (STD_VECTOR<Button *>::const_iterator it = names.begin(),
it_end = names.end(); it != it_end; ++ it)
{
const Button *const btn = *it;
@@ -1848,12 +1848,12 @@ void PopupMenu::showPopup(const int x, const int y, const ProgressBar *const b)
mY = y;
mBrowserBox->clearRows();
- std::vector <ProgressBar*> bars = miniStatusWindow->getBars();
+ STD_VECTOR <ProgressBar*> bars = miniStatusWindow->getBars();
ProgressBar *onlyBar = nullptr;
int cnt = 0;
// search for alone visible bar
- for (std::vector <ProgressBar*>::const_iterator it = bars.begin(),
+ for (STD_VECTOR <ProgressBar*>::const_iterator it = bars.begin(),
it_end = bars.end(); it != it_end; ++it)
{
ProgressBar *const bar = *it;
@@ -1869,7 +1869,7 @@ void PopupMenu::showPopup(const int x, const int y, const ProgressBar *const b)
if (cnt > 1)
onlyBar = nullptr;
- for (std::vector <ProgressBar*>::const_iterator it = bars.begin(),
+ for (STD_VECTOR <ProgressBar*>::const_iterator it = bars.begin(),
it_end = bars.end(); it != it_end; ++it)
{
ProgressBar *const bar = *it;
@@ -2107,11 +2107,11 @@ void PopupMenu::showWindowsPopup()
{
setMousePos();
mBrowserBox->clearRows();
- const std::vector<ButtonText*> &names = windowMenu->getButtonTexts();
+ const STD_VECTOR<ButtonText*> &names = windowMenu->getButtonTexts();
// TRANSLATORS: popup menu header
mBrowserBox->addRow(_("Show window"));
- FOR_EACH (std::vector<ButtonText*>::const_iterator, it, names)
+ FOR_EACH (STD_VECTOR<ButtonText*>::const_iterator, it, names)
{
const ButtonText *const btn = *it;
if (btn == nullptr)
diff --git a/src/gui/popups/popupmenu.h b/src/gui/popups/popupmenu.h
index 8c090d1f9..9816afb93 100644
--- a/src/gui/popups/popupmenu.h
+++ b/src/gui/popups/popupmenu.h
@@ -83,7 +83,7 @@ class PopupMenu final : public Popup, public LinkHandler
* Shows the beings related popup menu at the specified mouse coords.
*/
void showPopup(const int x, const int y,
- const std::vector<ActorSprite*> &beings);
+ const STD_VECTOR<ActorSprite*> &beings);
void showPlayerPopup(const std::string &nick);