Browse Source

Apply suggestions from code review

Co-authored-by: Ivan Savenko <[email protected]>
Laserlicht 1 year ago
parent
commit
f596fbc9b3

+ 1 - 3
client/battle/BattleInterfaceClasses.cpp

@@ -214,7 +214,7 @@ void BattleConsole::clear()
 	write({});
 }
 
-BattleConsoleWindow::BattleConsoleWindow(std::string text)
+BattleConsoleWindow::BattleConsoleWindow(const std::string & text)
 	: CWindowObject(BORDERED)
 {
 	OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
@@ -225,8 +225,6 @@ BattleConsoleWindow::BattleConsoleWindow(std::string text)
 	updateShadow();
 	center();
 
-	addUsedEvents(LCLICK);
-
 	backgroundTexture = std::make_shared<CFilledTexture>(ImagePath::builtin("DiBoxBck"), Rect(0, 0, pos.w, pos.h));
 	buttonOk = std::make_shared<CButton>(Point(183, 388), AnimationPath::builtin("IOKAY"), CButton::tooltip(), [this](){ close(); }, EShortcut::GLOBAL_ACCEPT);
 	Rect textArea(18, 17, 393, 354);

+ 1 - 1
client/battle/BattleInterfaceClasses.h

@@ -99,7 +99,7 @@ private:
 	std::shared_ptr<TransparentFilledRectangle> textBoxBackgroundBorder;
 	std::shared_ptr<CTextBox> textBox;
 public:
-	BattleConsoleWindow(std::string text);
+	BattleConsoleWindow(const std::string & text);
 };
 
 /// Hero battle animation