summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/popups/popupmenu.cpp2
-rw-r--r--src/gui/widgets/itemcontainer.cpp4
-rw-r--r--src/gui/windows/helpwindow.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index b5a337b1c..8a4392143 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -905,7 +905,7 @@ void PopupMenu::showChatPopup(const int x, const int y, ChatTab *const tab)
if (type == ChatTabType::WHISPER)
{
const WhisperTab *const wTab = static_cast<WhisperTab*>(tab);
- std::string name = wTab->getNick();
+ const std::string &name = wTab->getNick();
const Being* const being = actorManager->findBeingByName(
name, ActorType::Player);
diff --git a/src/gui/widgets/itemcontainer.cpp b/src/gui/widgets/itemcontainer.cpp
index 15e2df093..450379392 100644
--- a/src/gui/widgets/itemcontainer.cpp
+++ b/src/gui/widgets/itemcontainer.cpp
@@ -203,8 +203,8 @@ namespace
const ItemDbTypeT t2 = info2.getType();
if (t1 == t2)
{
- const std::string name1 = info1.getName();
- const std::string name2 = info2.getName();
+ const std::string &name1 = info1.getName();
+ const std::string &name2 = info2.getName();
if (name1 == name2)
{
return pair1->mItem->getInvIndex() <
diff --git a/src/gui/windows/helpwindow.cpp b/src/gui/windows/helpwindow.cpp
index 3a2c542ad..85a14594d 100644
--- a/src/gui/windows/helpwindow.cpp
+++ b/src/gui/windows/helpwindow.cpp
@@ -110,7 +110,7 @@ void HelpWindow::handleLink(const std::string &link,
{
if (!strStartWith(link, "http://") && !strStartWith(link, "https://"))
{
- std::string helpFile = link;
+ const std::string &helpFile = link;
loadHelp(helpFile);
}
else