1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Use BattleHex as const ref wherever possible

Minor Fixes
Drop unused function from BattleHexArray
This commit is contained in:
MichalZr6
2025-01-13 14:12:00 +01:00
parent 8f63a82d60
commit ecdd394bb1
56 changed files with 335 additions and 355 deletions

View File

@@ -26,7 +26,7 @@ public:
class IBattleOverlayLogVisualizer
{
public:
virtual void drawText(BattleHex tile, int lineNumber, const std::string & text) = 0;
virtual void drawText(const BattleHex & tile, int lineNumber, const std::string & text) = 0;
};
class DLL_LINKAGE IVisualLogBuilder
@@ -34,7 +34,7 @@ class DLL_LINKAGE IVisualLogBuilder
public:
virtual void addLine(int3 start, int3 end) = 0;
virtual void addText(int3 tile, const std::string & text, const std::optional<ColorRGBA> & color = {}) = 0;
virtual void addText(BattleHex tile, const std::string & text) = 0;
virtual void addText(const BattleHex & tile, const std::string & text) = 0;
void addText(int3 tile, const std::string & text, PlayerColor background);
};
@@ -89,7 +89,7 @@ private:
mapLines.emplace_back(start, end);
}
void addText(BattleHex tile, const std::string & text) override
void addText(const BattleHex & tile, const std::string & text) override
{
battleTexts.emplace_back(tile, text, std::optional<ColorRGBA>());
}