summaryrefslogtreecommitdiff
path: root/src/gui/windows
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-10-29 02:02:04 +0300
committerAndrei Karas <akaras@inbox.ru>2018-10-29 02:02:04 +0300
commita6d18b282ab916c6536dc25516affeb9200043b6 (patch)
tree9980735a47cb2118999fb4f4dceaa52bf9f4fae7 /src/gui/windows
parent98c74738f21d7ae256f1273b6c1614ee64e2a3ad (diff)
downloadplus-a6d18b282ab916c6536dc25516affeb9200043b6.tar.gz
plus-a6d18b282ab916c6536dc25516affeb9200043b6.tar.bz2
plus-a6d18b282ab916c6536dc25516affeb9200043b6.tar.xz
plus-a6d18b282ab916c6536dc25516affeb9200043b6.zip
Fix code style.s20181102
Diffstat (limited to 'src/gui/windows')
-rw-r--r--src/gui/windows/charcreatedialog.cpp8
-rw-r--r--src/gui/windows/chatwindow.cpp2
-rw-r--r--src/gui/windows/equipmentwindow.cpp2
-rw-r--r--src/gui/windows/inventorywindow.cpp2
-rw-r--r--src/gui/windows/npcdialog.cpp2
-rw-r--r--src/gui/windows/outfitwindow.cpp2
-rw-r--r--src/gui/windows/serverdialog.cpp4
-rw-r--r--src/gui/windows/skilldialog.cpp12
-rw-r--r--src/gui/windows/updaterwindow.cpp4
9 files changed, 19 insertions, 19 deletions
diff --git a/src/gui/windows/charcreatedialog.cpp b/src/gui/windows/charcreatedialog.cpp
index 49dcd8314..852dbc2cc 100644
--- a/src/gui/windows/charcreatedialog.cpp
+++ b/src/gui/windows/charcreatedialog.cpp
@@ -163,12 +163,12 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
beingSlot.cardsId);
}
- if (maxHairColor == 0u)
+ if (maxHairColor == 0U)
maxHairColor = ColorDB::getHairSize();
- if (maxHairStyle == 0u)
+ if (maxHairStyle == 0U)
maxHairStyle = ItemDB::getNumOfHairstyles();
- if (maxHairStyle != 0u)
+ if (maxHairStyle != 0U)
{
mHairStyle = (CAST_U32(rand())
% maxHairStyle) + minHairStyle;
@@ -177,7 +177,7 @@ CharCreateDialog::CharCreateDialog(CharSelectDialog *const parent,
{
mHairStyle = 0;
}
- if (maxHairColor != 0u)
+ if (maxHairColor != 0U)
{
mHairColor = (CAST_U32(rand())
% maxHairColor) + minHairColor;
diff --git a/src/gui/windows/chatwindow.cpp b/src/gui/windows/chatwindow.cpp
index a33bb4ec8..560826d79 100644
--- a/src/gui/windows/chatwindow.cpp
+++ b/src/gui/windows/chatwindow.cpp
@@ -883,7 +883,7 @@ void ChatWindow::keyPressed(KeyEvent &event)
const ChatTab *const tab = getFocused();
if ((tab != nullptr) && tab->hasRows())
{
- if (mChatHistoryIndex == 0u)
+ if (mChatHistoryIndex == 0U)
{
mChatHistoryIndex = CAST_U32(
tab->getRows().size());
diff --git a/src/gui/windows/equipmentwindow.cpp b/src/gui/windows/equipmentwindow.cpp
index ed59cab7d..7d0284fc1 100644
--- a/src/gui/windows/equipmentwindow.cpp
+++ b/src/gui/windows/equipmentwindow.cpp
@@ -352,7 +352,7 @@ void EquipmentWindow::action(const ActionEvent &event)
PlayerInfo::unequipItem(item, Sfx_true);
setSelected(-1);
}
- else if (eventId.find("tab_") == 0u)
+ else if (eventId.find("tab_") == 0U)
{
Button *const button = dynamic_cast<Button*>(event.getSource());
if (button == nullptr)
diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp
index f198743ec..be036a558 100644
--- a/src/gui/windows/inventorywindow.cpp
+++ b/src/gui/windows/inventorywindow.cpp
@@ -514,7 +514,7 @@ void InventoryWindow::action(const ActionEvent &event)
mItems->setName(mNameFilter->getText());
mItems->updateMatrix();
}
- else if (eventId.find("tag_") == 0u)
+ else if (eventId.find("tag_") == 0U)
{
std::string tagName = event.getId().substr(4);
mItems->setFilter(ItemDB::getTagId(tagName));
diff --git a/src/gui/windows/npcdialog.cpp b/src/gui/windows/npcdialog.cpp
index 0abce52ca..7a671c987 100644
--- a/src/gui/windows/npcdialog.cpp
+++ b/src/gui/windows/npcdialog.cpp
@@ -1354,7 +1354,7 @@ std::string NpcDialog::complexItemToStr(const ComplexItem *const item)
{
const STD_VECTOR<Item*> &items = item->getChilds();
const size_t sz = items.size();
- if (sz == 0u)
+ if (sz == 0U)
return str;
const Item *item2 = items[0];
diff --git a/src/gui/windows/outfitwindow.cpp b/src/gui/windows/outfitwindow.cpp
index 8a36bca6c..365ccbfc4 100644
--- a/src/gui/windows/outfitwindow.cpp
+++ b/src/gui/windows/outfitwindow.cpp
@@ -74,7 +74,7 @@ OutfitWindow::OutfitWindow() :
nullptr, std::string())),
// TRANSLATORS: outfits window checkbox
mAwayOutfitCheck(new CheckBox(this, _("Away outfit"),
- serverConfig.getValue("OutfitAwayIndex", OUTFITS_COUNT - 1) != 0u,
+ serverConfig.getValue("OutfitAwayIndex", OUTFITS_COUNT - 1) != 0U,
nullptr, std::string())),
// TRANSLATORS: outfits window label
mKeyLabel(new Label(this, strprintf(_("Key: %s"),
diff --git a/src/gui/windows/serverdialog.cpp b/src/gui/windows/serverdialog.cpp
index a8db9302d..9656d0c1c 100644
--- a/src/gui/windows/serverdialog.cpp
+++ b/src/gui/windows/serverdialog.cpp
@@ -868,11 +868,11 @@ int ServerDialog::downloadUpdate(void *ptr,
else
{
float progress = static_cast<float>(remaining);
- if (total != 0u)
+ if (total != 0U)
progress /= static_cast<float>(total);
if (progress != progress || progress < 0.0F)
- progress = 0.0f;
+ progress = 0.0F;
else if (progress > 1.0F)
progress = 1.0F;
diff --git a/src/gui/windows/skilldialog.cpp b/src/gui/windows/skilldialog.cpp
index e60465367..39235c570 100644
--- a/src/gui/windows/skilldialog.cpp
+++ b/src/gui/windows/skilldialog.cpp
@@ -595,25 +595,25 @@ void SkillDialog::loadSkillData(XmlNodeConstPtr node,
missile.particle = XML::getProperty(
node, "missile-particle", "");
missile.z = XML::getFloatProperty(
- node, "missile-z", 32.0f);
+ node, "missile-z", 32.0F);
missile.lifeTime = XML::getProperty(
node, "missile-lifetime", 500);
missile.speed = XML::getFloatProperty(
- node, "missile-speed", 7.0f);
+ node, "missile-speed", 7.0F);
missile.dieDistance = XML::getFloatProperty(
- node, "missile-diedistance", 8.0f);
+ node, "missile-diedistance", 8.0F);
MissileInfo &castingMissile = data->castingMissile;
castingMissile.particle = XML::getProperty(
node, "castingMissile-particle", "");
castingMissile.z = XML::getFloatProperty(
- node, "castingMissile-z", 32.0f);
+ node, "castingMissile-z", 32.0F);
castingMissile.lifeTime = XML::getProperty(
node, "castingMissile-lifetime", 500);
castingMissile.speed = XML::getFloatProperty(
- node, "castingMissile-speed", 7.0f);
+ node, "castingMissile-speed", 7.0F);
castingMissile.dieDistance = XML::getFloatProperty(
- node, "castingMissile-diedistance", 8.0f);
+ node, "castingMissile-diedistance", 8.0F);
data->castingAnimation = XML::getProperty(
node,
diff --git a/src/gui/windows/updaterwindow.cpp b/src/gui/windows/updaterwindow.cpp
index a4b01a050..c7b5ef8b0 100644
--- a/src/gui/windows/updaterwindow.cpp
+++ b/src/gui/windows/updaterwindow.cpp
@@ -395,7 +395,7 @@ void UpdaterWindow::loadNews()
{
firstLine = false;
const size_t i = line.find("##9 Latest client version: ##6");
- if (i == 0u)
+ if (i == 0U)
continue;
if (file.is_open())
@@ -529,7 +529,7 @@ int UpdaterWindow::updateProgress(void *ptr,
}
}
- if (dt == 0u)
+ if (dt == 0U)
dt = 1;
float progress = static_cast<float>(dn) /