From 37969cb5a1892a05abc84f087213c9903c2c654e Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 12 Feb 2016 17:33:51 +0300 Subject: Fix code style. --- src/gui/fonts/textchunksmall.cpp | 3 ++- src/gui/fonts/textchunksmall.h | 3 ++- src/gui/windows/inventorywindow.cpp | 7 ++++++- 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'src/gui') diff --git a/src/gui/fonts/textchunksmall.cpp b/src/gui/fonts/textchunksmall.cpp index f8c84fdb8..a8012522e 100644 --- a/src/gui/fonts/textchunksmall.cpp +++ b/src/gui/fonts/textchunksmall.cpp @@ -40,11 +40,12 @@ TextChunkSmall::TextChunkSmall(const TextChunkSmall &old) : { } -void TextChunkSmall::operator=(const TextChunkSmall &chunk) +TextChunkSmall &TextChunkSmall::operator=(const TextChunkSmall &chunk) { text = chunk.text; color = chunk.color; color2 = chunk.color2; + return *this; } bool TextChunkSmall::operator==(const TextChunkSmall &chunk) const diff --git a/src/gui/fonts/textchunksmall.h b/src/gui/fonts/textchunksmall.h index 75c4e6dd7..64a265da4 100644 --- a/src/gui/fonts/textchunksmall.h +++ b/src/gui/fonts/textchunksmall.h @@ -38,7 +38,8 @@ class TextChunkSmall final bool operator==(const TextChunkSmall &restrict chunk) const restrict2; bool operator<(const TextChunkSmall &restrict chunk) const restrict2; - void operator=(const TextChunkSmall &restrict chunk) restrict2; + TextChunkSmall &operator=(const TextChunkSmall &restrict chunk) + restrict2; std::string text; Color color; Color color2; diff --git a/src/gui/windows/inventorywindow.cpp b/src/gui/windows/inventorywindow.cpp index 5c6ae3faa..881e10c1a 100644 --- a/src/gui/windows/inventorywindow.cpp +++ b/src/gui/windows/inventorywindow.cpp @@ -588,7 +588,12 @@ void InventoryWindow::mouseClicked(MouseEvent &event) const int my = event.getY() + getY(); if (popupMenu) - popupMenu->showPopup(this, mx, my, item, mInventory->getType()); + { + popupMenu->showPopup(this, + mx, my, + item, + mInventory->getType()); + } } } else -- cgit v1.2.3-70-g09d2