summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-04-26 20:08:06 +0300
committerAndrei Karas <akaras@inbox.ru>2013-04-26 20:08:06 +0300
commitd60eec2c2cd453ecbaee7883a272479792875465 (patch)
treee69ce19116c4d7eb043c33bc577866959bc87b43
parent5560a44ff5beea4fc2b88a589a3f915b9d0555d2 (diff)
downloadplus-d60eec2c2cd453ecbaee7883a272479792875465.tar.gz
plus-d60eec2c2cd453ecbaee7883a272479792875465.tar.bz2
plus-d60eec2c2cd453ecbaee7883a272479792875465.tar.xz
plus-d60eec2c2cd453ecbaee7883a272479792875465.zip
fix code style more.
-rw-r--r--src/actorspritemanager.cpp2
-rw-r--r--src/actorspritemanager.h2
-rw-r--r--src/gui/widgets/tabbedarea.cpp2
-rw-r--r--src/gui/widgets/window.cpp4
-rw-r--r--src/gui/widgets/window.h4
-rw-r--r--src/net/eathena/playerhandler.cpp2
-rw-r--r--src/net/eathena/playerhandler.h2
-rw-r--r--src/net/playerhandler.h2
-rw-r--r--src/net/tmwa/playerhandler.cpp2
-rw-r--r--src/net/tmwa/playerhandler.h2
-rw-r--r--src/resources/resourcemanager.cpp4
-rw-r--r--src/resources/resourcemanager.h4
12 files changed, 16 insertions, 16 deletions
diff --git a/src/actorspritemanager.cpp b/src/actorspritemanager.cpp
index 3f0f7b5d4..44fb7e2a4 100644
--- a/src/actorspritemanager.cpp
+++ b/src/actorspritemanager.cpp
@@ -1100,7 +1100,7 @@ Being *ActorSpriteManager::findNearestLivingBeing(const Being *const
bool ActorSpriteManager::validateBeing(const Being *const aroundBeing,
Being *const being,
- const Being::Type type,
+ const Being::Type &type,
const Being* const excluded,
const int maxCost) const
{
diff --git a/src/actorspritemanager.h b/src/actorspritemanager.h
index 758714d6a..1a599a865 100644
--- a/src/actorspritemanager.h
+++ b/src/actorspritemanager.h
@@ -305,7 +305,7 @@ class ActorSpriteManager final: public ConfigListener
protected:
bool validateBeing(const Being *const aroundBeing,
Being *const being,
- const Being::Type type,
+ const Being::Type &type,
const Being *const excluded = nullptr,
const int maxCost = 20) const A_WARN_UNUSED;
diff --git a/src/gui/widgets/tabbedarea.cpp b/src/gui/widgets/tabbedarea.cpp
index 75be5bf6f..21e615252 100644
--- a/src/gui/widgets/tabbedarea.cpp
+++ b/src/gui/widgets/tabbedarea.cpp
@@ -381,7 +381,7 @@ void TabbedArea::widgetResized(const gcn::Event &event A_UNUSED)
{
if (mFollowDownScroll && height != 0)
{
- const gcn::Rectangle rect = w->getDimension();
+ const gcn::Rectangle &rect = w->getDimension();
if (rect.height != 0 && rect.height > height + 2)
{
if (scr->getVerticalScrollAmount()
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp
index 053c60875..0619a85a9 100644
--- a/src/gui/widgets/window.cpp
+++ b/src/gui/widgets/window.cpp
@@ -360,7 +360,7 @@ void Window::setLocationHorisontallyRelativeTo(const gcn::Widget *const widget)
- mDimension.width) / 2 - x), 0);
}
-void Window::setLocationRelativeTo(const ImageRect::ImagePosition position,
+void Window::setLocationRelativeTo(const ImageRect::ImagePosition &position,
int offsetX, int offsetY)
{
if (position == ImageRect::UPPER_LEFT)
@@ -940,7 +940,7 @@ void Window::setDefaultSize()
}
void Window::setDefaultSize(int defaultWidth, int defaultHeight,
- const ImageRect::ImagePosition position,
+ const ImageRect::ImagePosition &position,
const int offsetX, const int offsetY)
{
int x = 0, y = 0;
diff --git a/src/gui/widgets/window.h b/src/gui/widgets/window.h
index bf9bd935f..45a70dbeb 100644
--- a/src/gui/widgets/window.h
+++ b/src/gui/widgets/window.h
@@ -101,7 +101,7 @@ class Window : public gcn::Window,
/**
* Sets the location relative to the given enumerated position.
*/
- void setLocationRelativeTo(const ImageRect::ImagePosition position,
+ void setLocationRelativeTo(const ImageRect::ImagePosition &position,
int offsetX = 0, int offsetY = 0);
/**
@@ -329,7 +329,7 @@ class Window : public gcn::Window,
* on a relative enumerated position, rather than a coordinate position.
*/
void setDefaultSize(int defaultWidth, int defaultHeight,
- const ImageRect::ImagePosition position,
+ const ImageRect::ImagePosition &position,
const int offsetx = 0, const int offsetY = 0);
/**
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index 4897e6b70..00234bd7c 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -184,7 +184,7 @@ void PlayerHandler::setDestination(const int x, const int y,
static_cast<unsigned char>(direction));
}
-void PlayerHandler::changeAction(const Being::Action action) const
+void PlayerHandler::changeAction(const Being::Action &action) const
{
unsigned char type;
switch (action)
diff --git a/src/net/eathena/playerhandler.h b/src/net/eathena/playerhandler.h
index 4ea630a60..4e82d7067 100644
--- a/src/net/eathena/playerhandler.h
+++ b/src/net/eathena/playerhandler.h
@@ -53,7 +53,7 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler
void setDirection(const unsigned char direction) const override;
void setDestination(const int x, const int y,
const int direction) const override;
- void changeAction(const Being::Action action) const override;
+ void changeAction(const Being::Action &action) const override;
void updateStatus(const uint8_t status) const override;
void processPlayerShortcuts(Net::MessageIn &msg) const;
diff --git a/src/net/playerhandler.h b/src/net/playerhandler.h
index d3b9dd6c3..152855d4c 100644
--- a/src/net/playerhandler.h
+++ b/src/net/playerhandler.h
@@ -55,7 +55,7 @@ class PlayerHandler
virtual void setDestination(const int x, const int y,
const int direction) const = 0;
- virtual void changeAction(const Being::Action action) const = 0;
+ virtual void changeAction(const Being::Action &action) const = 0;
virtual void respawn() const = 0;
diff --git a/src/net/tmwa/playerhandler.cpp b/src/net/tmwa/playerhandler.cpp
index 7ce018738..b63be0a6d 100644
--- a/src/net/tmwa/playerhandler.cpp
+++ b/src/net/tmwa/playerhandler.cpp
@@ -181,7 +181,7 @@ void PlayerHandler::setDestination(const int x, const int y,
static_cast<unsigned char>(direction));
}
-void PlayerHandler::changeAction(const Being::Action action) const
+void PlayerHandler::changeAction(const Being::Action &action) const
{
char type;
switch (action)
diff --git a/src/net/tmwa/playerhandler.h b/src/net/tmwa/playerhandler.h
index 5e15f5a3a..ebfc66874 100644
--- a/src/net/tmwa/playerhandler.h
+++ b/src/net/tmwa/playerhandler.h
@@ -53,7 +53,7 @@ class PlayerHandler final : public MessageHandler, public Ea::PlayerHandler
void setDirection(const unsigned char direction) const override;
void setDestination(const int x, const int y,
const int direction) const override;
- void changeAction(const Being::Action action) const override;
+ void changeAction(const Being::Action &action) const override;
void processOnlineList(Net::MessageIn &msg) const;
void requestOnlineList() const override;
void updateStatus(const uint8_t status) const override;
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp
index dd2e6c5ac..c8230550a 100644
--- a/src/resources/resourcemanager.cpp
+++ b/src/resources/resourcemanager.cpp
@@ -1016,8 +1016,8 @@ StringVect ResourceManager::loadTextFileLocal(
return lines;
}
-void ResourceManager::saveTextFile(std::string path, const std::string name,
- const std::string text) const
+void ResourceManager::saveTextFile(std::string path, const std::string &name,
+ const std::string &text) const
{
if (!mkdir_r(path.c_str()))
{
diff --git a/src/resources/resourcemanager.h b/src/resources/resourcemanager.h
index 1e9124cc3..d45a4ba11 100644
--- a/src/resources/resourcemanager.h
+++ b/src/resources/resourcemanager.h
@@ -271,8 +271,8 @@ class ResourceManager final
static StringVect loadTextFileLocal(const std::string &fileName)
A_WARN_UNUSED;
- void saveTextFile(std::string path, const std::string name,
- const std::string text) const;
+ void saveTextFile(std::string path, const std::string &name,
+ const std::string &text) const;
Image *getRescaled(Image *const image,
const int width, const int height) A_WARN_UNUSED;