Commit 29e4c0e3 authored by sm's avatar sm

Please cppcheck

parent 99301eb1
......@@ -34,7 +34,7 @@ namespace stmg
class BackgroundThAniFactory : public StdThemeAnimationFactory
{
public:
BackgroundThAniFactory(StdTheme* p1Owner);
explicit BackgroundThAniFactory(StdTheme* p1Owner);
bool supports(const shared_ptr<LevelAnimation>& refLevelAnimation) override;
shared_ptr<ThemeAnimation> create(const shared_ptr<StdThemeContext>& refThemeContext, const shared_ptr<LevelAnimation>& refLevelAnimation) override;
......@@ -45,7 +45,6 @@ private:
public:
BackgroundThAni() = default;
void reInit() {}
// NRect getRect(int32_t nViewTick, int32_t nTotViewTicks) override;
int32_t getZ(int32_t nViewTick, int32_t nTotViewTicks) override;
bool isStarted(int32_t nViewTick, int32_t nTotViewTicks) override;
bool isDone(int32_t nViewTick, int32_t nTotViewTicks) override;
......
......@@ -46,7 +46,6 @@ private:
public:
ImageSeqThAni() = default;
void reInit() {}
// NRect getRect(int32_t nViewTick, int32_t nTotViewTicks) override;
int32_t getZ(int32_t nViewTick, int32_t nTotViewTicks) override;
bool isStarted(int32_t nViewTick, int32_t nTotViewTicks) override;
bool isDone(int32_t nViewTick, int32_t nTotViewTicks) override;
......
......@@ -47,7 +47,6 @@ private:
public:
PlainTextThAni() = default;
void reInit() {}
// NRect getRect(int32_t nViewTick, int32_t nTotViewTicks) override;
int32_t getZ(int32_t nViewTick, int32_t nTotViewTicks) override;
bool isStarted(int32_t nViewTick, int32_t nTotViewTicks) override;
bool isDone(int32_t nViewTick, int32_t nTotViewTicks) override;
......
......@@ -44,7 +44,6 @@ private:
public:
StaticGridThAni() = default;
void reInit() {}
// NRect getRect(int32_t nViewTick, int32_t nTotViewTicks) override;
int32_t getZ(int32_t nViewTick, int32_t nTotViewTicks) override;
bool isStarted(int32_t nViewTick, int32_t nTotViewTicks) override;
bool isDone(int32_t nViewTick, int32_t nTotViewTicks) override;
......
......@@ -44,7 +44,7 @@ public:
/** Constructor.
* @param p1Owner The theme. Cannot be null.
*/
ContainerModifier(StdTheme* p1Owner);
explicit ContainerModifier(StdTheme* p1Owner);
/** Add sub modifiers to this container.
* @param aModifier The modifiers. Cannot be null.
*/
......
......@@ -44,7 +44,7 @@ public:
/** Image from a file constructor.
* @param oImageFile The file. Must be defined.
*/
Image(const File& oImageFile);
explicit Image(const File& oImageFile);
/** Sub-image of another image constructor.
* @param refImage The master image. Cannot be null.
* @param oSubRect The rectangle within the master image in pixels. Width and height must be positive numbers.
......
......@@ -30,7 +30,7 @@ class StdTheme;
class AlphaModifier : public ContainerModifier
{
public:
AlphaModifier(StdTheme* p1Owner);
explicit AlphaModifier(StdTheme* p1Owner);
FLOW_CONTROL drawTile(const Cairo::RefPtr<Cairo::Context>& refCc, StdThemeDrawingContext& oDc
, const Tile& oTile, int32_t nPlayer, const std::vector<double>& aAniElapsed) override;
private:
......
......@@ -30,7 +30,7 @@ class StdTheme;
class FillModifier : public StdThemeModifier
{
public:
FillModifier(StdTheme* p1Owner);
explicit FillModifier(StdTheme* p1Owner);
FLOW_CONTROL drawTile(const Cairo::RefPtr<Cairo::Context>& refCc, StdThemeDrawingContext& oDc
, const Tile& oTile, int32_t nPlayer, const std::vector<double>& aAniElapsed) override;
private:
......
......@@ -34,7 +34,7 @@ class StdTheme;
class IfElseModifier : public ContainerModifier //StdThemeModifier , protected MultiContainerModifier
{
public:
IfElseModifier(StdTheme* p1Owner);
explicit IfElseModifier(StdTheme* p1Owner);
void addCondition(unique_ptr<TileSelector> refSelect, std::vector< unique_ptr<StdThemeModifier> > aModifiers);
void setElse(std::vector< unique_ptr<StdThemeModifier> > aModifier);
FLOW_CONTROL drawTile(const Cairo::RefPtr<Cairo::Context>& refCc, StdThemeDrawingContext& oDc
......
......@@ -33,7 +33,7 @@ class StdTheme;
class SelectCaseModifier : public ContainerModifier //StdThemeModifier, protected MultiContainerModifier
{
public:
SelectCaseModifier(StdTheme* p1Owner);
explicit SelectCaseModifier(StdTheme* p1Owner);
void addCase(int32_t nIdAss, std::vector< unique_ptr<StdThemeModifier> > aModifiers);
void setDefault(std::vector< unique_ptr<StdThemeModifier> > aModifiers);
FLOW_CONTROL drawTile(const Cairo::RefPtr<Cairo::Context>& refCc, StdThemeDrawingContext& oDc
......
......@@ -30,7 +30,7 @@ class StdTheme;
class SelectedImageModifier : public StdThemeModifier
{
public:
SelectedImageModifier(StdTheme* p1Owner);
explicit SelectedImageModifier(StdTheme* p1Owner);
FLOW_CONTROL drawTile(const Cairo::RefPtr<Cairo::Context>& refCc, StdThemeDrawingContext& oDc
, const Tile& oTile, int32_t nPlayer, const std::vector<double>& aAniElapsed) override;
private:
......
......@@ -30,7 +30,7 @@ class StdTheme;
class StopModifier : public StdThemeModifier
{
public:
StopModifier(StdTheme* p1Owner);
explicit StopModifier(StdTheme* p1Owner);
FLOW_CONTROL drawTile(const Cairo::RefPtr<Cairo::Context>& refCc, StdThemeDrawingContext& oDc
, const Tile& oTile, int32_t nPlayer, const std::vector<double>& aAniElapsed) override;
private:
......
......@@ -100,7 +100,7 @@ public:
void dump() const { dump(0); }
#endif //NDEBUG
private:
SegmentedFunction(bool bCreateZeroSegment)
explicit SegmentedFunction(bool bCreateZeroSegment)
{
if (bCreateZeroSegment) {
m_aSegments.emplace_back(0.0, 0.0, 0.0);
......
......@@ -42,7 +42,7 @@ public:
/** Constructor.
* @param p1Owner The owner theme. Cannot be null.
*/
StdThemeAnimationFactory(StdTheme* p1Owner);
explicit StdThemeAnimationFactory(StdTheme* p1Owner);
virtual ~StdThemeAnimationFactory() = default;
/** Tells whether the factory supports the model animation.
......
......@@ -79,7 +79,7 @@ protected:
/** Constructor.
* @param p1Owner The theme. Cannot be null.
*/
StdThemeModifier(StdTheme* p1Owner);
explicit StdThemeModifier(StdTheme* p1Owner);
/** The theme.
* @return The theme. Is not null.
*/
......
......@@ -46,7 +46,7 @@ public:
/** Constructor.
* @param p1Owner The owner. Cannot be null.
*/
StdThemeWidgetFactory(StdTheme* p1Owner);
explicit StdThemeWidgetFactory(StdTheme* p1Owner);
virtual ~StdThemeWidgetFactory() = default;
/** Creates a theme widget for a game widget.
* @param refGameWidget The model. Cannot be null.
......@@ -90,7 +90,7 @@ template< class TW >
class StdLeafThemeWidget
{
public:
StdLeafThemeWidget(TW* p0TW);
explicit StdLeafThemeWidget(TW* p0TW);
void reInit(double fTileWHRatio);
/** Default implementation of canChange().
......@@ -164,7 +164,7 @@ template< class TW >
class StdRelSizedThemeWidget : public StdLeafThemeWidget<TW>
{
public:
StdRelSizedThemeWidget(TW* p0TW);
explicit StdRelSizedThemeWidget(TW* p0TW);
void reInit(RelSizedGameWidget* p0RelSizedGameWidget, double fTileWHRatio);
......@@ -189,6 +189,7 @@ StdLeafThemeWidget<TW>::StdLeafThemeWidget(TW* p0TW)
, m_nPixW(0)
, m_nPixH(0)
, m_bParentCanChange(false)
, m_bCacheInvalid(true)
{
static_assert(std::is_base_of<ThemeWidget, TW>::value, "Must derive from ThemeWidget");
assert(p0TW != nullptr);
......@@ -203,8 +204,8 @@ void StdLeafThemeWidget<TW>::reInit(double fTileWHRatio)
m_nPixY = std::numeric_limits<int32_t>::min();
m_nPixW = 0;
m_nPixH = 0;
m_bCacheInvalid = true;
m_bParentCanChange = false;
m_bCacheInvalid = true;
}
#ifndef NDEBUG
template< class TW >
......
......@@ -163,7 +163,7 @@ protected:
/** Constructs the theme widget.
* @param refModel The model. Cannot be null.
*/
ThemeWidget(const shared_ptr<GameWidget>& refModel)
explicit ThemeWidget(const shared_ptr<GameWidget>& refModel)
: m_p0Parent(nullptr)
, m_bIsContainer(false)
, m_p0ThemeLayout(nullptr)
......@@ -221,7 +221,7 @@ protected:
/** Constructor.
* @param refModel The model. Cannot be null.
*/
ThemeContainerWidget(const shared_ptr<GameWidget>& refModel)
explicit ThemeContainerWidget(const shared_ptr<GameWidget>& refModel)
: ThemeWidget(refModel)
{
ThemeWidget::m_bIsContainer = true;
......
......@@ -38,7 +38,7 @@ using std::shared_ptr;
class BackgroundThWidgetFactory : public StdThemeWidgetFactory
{
public:
BackgroundThWidgetFactory(StdTheme* p1Owner);
explicit BackgroundThWidgetFactory(StdTheme* p1Owner);
shared_ptr<ThemeWidget> create(const shared_ptr<GameWidget>& refGameWidget
, double fTileWHRatio, const Glib::RefPtr<Pango::Layout>& refFontLayout) override;
private:
......
......@@ -31,7 +31,7 @@ namespace stmg
class TransparentThWidgetFactory : public StdThemeWidgetFactory
{
public:
TransparentThWidgetFactory(StdTheme* p1Owner);
explicit TransparentThWidgetFactory(StdTheme* p1Owner);
shared_ptr<ThemeWidget> create(const shared_ptr<GameWidget>& refGameWidget
, double fTileWHRatio, const Glib::RefPtr<Pango::Layout>& refFontLayout) override;
......
......@@ -241,15 +241,11 @@ void GameWindow::onWindowRealize()
}
void GameWindow::setUp() //TODO tearDown() ????
{
// m_bWaitingForDrawingAreaSizeAllocate = true;
// Gtk::Allocation oAllocation;
// onDrawingAreaSizeAllocate(oAllocation);
changeScreen(STATUS_MENU, s_nScreenMain);
onChangedGame();
onChangedPlayers();
//onChangedTheme();
onChangedTheme();
m_p0ButtonMainNewGame->grab_focus();
......
......@@ -59,7 +59,7 @@ protected:
/** Constructor.
* @param oMainWindowData The initialization data.
*/
GameWindow(MainWindowData&& oMainWindowData);
explicit GameWindow(MainWindowData&& oMainWindowData);
/** Initialization.
* @return Error string or empty if successful.
......
......@@ -536,12 +536,12 @@ void PlayersDialog::onIntOptionChanged(OwnerType eOptionOwner, IntOption* p0IntO
{
const double fValue = p0SB->get_value();
const int32_t nValue = std::round<int32_t>(fValue);
setOptionValue(eOptionOwner, p0IntOption->getName(), nValue);
setOptionValue(eOptionOwner, p0IntOption->getName(), Variant{nValue});
}
void PlayersDialog::onBoolOptionChanged(OwnerType eOptionOwner, BoolOption* p0BoolOption, Gtk::CheckButton* p0CB)
{
const bool bValue = p0CB->get_active();
setOptionValue(eOptionOwner, p0BoolOption->getName(), bValue);
setOptionValue(eOptionOwner, p0BoolOption->getName(), Variant{bValue});
}
void PlayersDialog::onEnumOptionChanged(OwnerType eOptionOwner, EnumOption* p0EnumOption, Gtk::RadioButton* p0RB, int32_t nEnumIdx)
{
......@@ -551,7 +551,7 @@ void PlayersDialog::onEnumOptionChanged(OwnerType eOptionOwner, EnumOption* p0En
return; //--------------------------------------------------------------
}
int32_t nValue = p0EnumOption->getEnum(nEnumIdx);
setOptionValue(eOptionOwner, p0EnumOption->getName(), nValue);
setOptionValue(eOptionOwner, p0EnumOption->getName(), Variant{nValue});
}
void PlayersDialog::setOptionValue(OwnerType eOptionOwner, const std::string& sOptionName, const Variant& oVar)
{
......
......@@ -34,7 +34,7 @@ using std::shared_ptr;
class PlayersDialog : public Gtk::Dialog
{
public:
PlayersDialog(const shared_ptr<StdConfig>& refStdConfig);
explicit PlayersDialog(const shared_ptr<StdConfig>& refStdConfig);
void reInit(shared_ptr<StdPreferences>& refPrefs);
......@@ -104,7 +104,7 @@ private:
{
public:
KeysNotebook() = delete;
KeysNotebook(PlayersDialog* p0Dialog)
explicit KeysNotebook(PlayersDialog* p0Dialog)
: Gtk::Notebook()
, m_p0Dialog(p0Dialog)
{
......
......@@ -370,7 +370,7 @@ bool StdView::handleXYEvent(const shared_ptr<stmi::Event>& refXYEvent, stmi::XYE
}
return refITW->handleXYInput(refXYEvent, nResTeam, nResMate);
}
bool StdView::isReady()
bool StdView::isReady() const
{
return m_refTheme.operator bool();
}
......
......@@ -114,7 +114,7 @@ private:
const Glib::RefPtr<Pango::Layout>& getFontLayout() { return m_refFontLayout; }
// The view was initialized
bool isReady();
bool isReady() const;
NRect setSize(NSize oPixSize, bool bInit);
......@@ -163,7 +163,7 @@ private:
struct OpenSequence
{
OpenSequence(int32_t nCapabilityId)
explicit OpenSequence(int32_t nCapabilityId)
: m_nCapabilityId(nCapabilityId)
, m_nGrabId(-1)
, m_nInteractiveIdx(-1)
......
......@@ -33,16 +33,16 @@ namespace stmg
class GameInfoCtx : public ConditionalCtx
{
public:
GameInfoCtx(const shared_ptr<AppConfig>& refAppConfig, File oGameFile, XmlConditionalParser& oXmlConditionalParser)
GameInfoCtx(const shared_ptr<AppConfig>& refAppConfig, const File& oGameFile, XmlConditionalParser& oXmlConditionalParser)
: ConditionalCtx(refAppConfig, s_oDummy, oXmlConditionalParser)
{
m_oGameInfo.m_oGameFile = std::move(oGameFile);
m_oGameInfo.m_oGameFile = oGameFile;
s_oDummy.clear();
}
GameInfoCtx(const shared_ptr<AppPreferences>& refAppPreferences, Named& oNamed, File oGameFile, XmlConditionalParser& oXmlConditionalParser)
GameInfoCtx(const shared_ptr<AppPreferences>& refAppPreferences, Named& oNamed, const File& oGameFile, XmlConditionalParser& oXmlConditionalParser)
: ConditionalCtx(refAppPreferences, oNamed, oXmlConditionalParser)
{
m_oGameInfo.m_oGameFile = std::move(oGameFile);
m_oGameInfo.m_oGameFile = oGameFile;
}
const GameConstraints& getGameConstraints() const { return m_oGameInfo.m_oGameConstraints; }
......
......@@ -32,8 +32,8 @@ namespace stmg
class LayoutCtx : public GameInfoCtx
{
public:
LayoutCtx(const shared_ptr<AppPreferences>& refAppPreferences, Named& oNamed, File oFile, XmlConditionalParser& oXmlConditionalParser)
: GameInfoCtx(refAppPreferences, oNamed, std::move(oFile), oXmlConditionalParser)
LayoutCtx(const shared_ptr<AppPreferences>& refAppPreferences, Named& oNamed, const File& oFile, XmlConditionalParser& oXmlConditionalParser)
: GameInfoCtx(refAppPreferences, oNamed, oFile, oXmlConditionalParser)
, m_nTeam(-1)
, m_nMate(-1)
{
......
......@@ -21,9 +21,7 @@
#define STMG_XML_GAME_LOADER_H
#include <stmm-games-gtk/gameloader.h>
//#include <stmm-games/apppreferences.h>
//#include <stmm-games-gtk/gameconstraints.h>
#include <stmm-games-gtk/gameloader.h>
#include <vector>
......@@ -48,8 +46,6 @@ public:
void addXmlEventParser(unique_ptr<XmlEventParser> refXmlEventParser);
void addXmlGameWidgetParser(unique_ptr<XmlGameWidgetParser> refXmlGameWidgetParser);
// shared_ptr<XmlGameParser>& getParser() { return m_refGameParser; };
const std::vector<std::string>& getGameNames() override;
std::vector<std::string> getGameNames(const AppPreferences& oAppPreferences) override;
const GameInfo& getGameInfo(const std::string& sGameName) override;
......
......@@ -32,8 +32,8 @@ namespace stmg
class GameInitCtx : public LayoutCtx
{
public:
GameInitCtx(const shared_ptr<AppPreferences>& refAppPreferences, Named& oNamed, File oFile, XmlConditionalParser& oXmlConditionalParser)
: LayoutCtx(refAppPreferences, oNamed, std::move(oFile), oXmlConditionalParser)
GameInitCtx(const shared_ptr<AppPreferences>& refAppPreferences, Named& oNamed, const File& oFile, XmlConditionalParser& oXmlConditionalParser)
: LayoutCtx(refAppPreferences, oNamed, oFile, oXmlConditionalParser)
{
}
void setName(const std::string& sGameName)
......
......@@ -45,7 +45,7 @@ protected:
/** Constructor for subclasses.
* @param sGameWidgetName The game widget element name. Cannot be empty.
*/
XmlBoxWidgetParser(const std::string& sGameWidgetName);
explicit XmlBoxWidgetParser(const std::string& sGameWidgetName);
/** See parseBoxWidget with additional aSkipChildNames parameter. */
void parseBoxWidget(BoxWidget::Init& oInit, LayoutCtx& oCtx, const xmlpp::Element* p0WidgetElement);
/** Parse box widget for subclasses.
......
......@@ -37,7 +37,7 @@ namespace stmg
class XmlBlockParser //: private XmlCommonParser
{
public:
XmlBlockParser(XmlTraitsParser& oXmlTraitsParser)
explicit XmlBlockParser(XmlTraitsParser& oXmlTraitsParser)
: m_oXmlTraitsParser(oXmlTraitsParser)
, m_oXmlConditionalParser(oXmlTraitsParser.getXmlConditionalParser())
{
......
......@@ -272,15 +272,15 @@ void XmlGameInfoParser::parseGameConstraints(ParserCtx& oCtx, const xmlpp::Eleme
//assert(oGameConstraints.m_nTeamsMax > 1);
if (bTeamsPerLevelDefined && bLevelsDefined) {
// 1 team games considered "All teams in one level"
bATIOLDefined = true;
//bATIOLDefined = true;
bATIOL = true;
} else if (bTeamsPerLevelDefined) {
//assert(oGameConstraints.m_nTeamsPerLevelMax == 1);
bATIOLDefined = true;
//bATIOLDefined = true;
bATIOL = false;
} else if (bLevelsDefined) {
//assert(oGameConstraints.m_nLevelsMax == 1);
bATIOLDefined = true;
//bATIOLDefined = true;
bATIOL = true;
} else {
throw XmlCommonErrors::errorAttrEitherMustBeDefined(oCtx, p0Element, s_sGameConstraintsTeamsPerLevelAttr, s_sGameConstraintsLevelsAttr);
......
......@@ -38,7 +38,7 @@ class XmlGameInfoParser;
class XmlGameInfoParser //: private XmlCommonParser
{
public:
XmlGameInfoParser(XmlConditionalParser& oXmlConditionalParser)
explicit XmlGameInfoParser(XmlConditionalParser& oXmlConditionalParser)
: m_oXmlConditionalParser(oXmlConditionalParser)
{
}
......
......@@ -29,10 +29,7 @@
#include <vector>
#include <cassert>
//#include <limits>
//#include <algorithm>
#include <iostream>
//#include <sstream>
#include <stdexcept>
namespace stmg
......
......@@ -570,7 +570,7 @@ void XmlGameParser::parseFilterInput(GameCtx& oCtx, Event* p0Event, const xmlpp:
nOperand = XmlCommonParser::strToNumber<int32_t>(oCtx, p0Element, s_sEventFilterInputNewValueMaxAttr, sMaxValue, false
, false, -1, false, -1);
eOp = Event::MSG_FILTER_VALUE_OP_MAX_ADD;
sOpAttr = s_sEventFilterInputNewValueMaxAttr;
//sOpAttr = s_sEventFilterInputNewValueMaxAttr;
}
if ((eOp == Event::MSG_FILTER_VALUE_OP_UNCHANGED) && bAddSet) {
eOp = Event::MSG_FILTER_VALUE_OP_MULT_ADD;
......
......@@ -41,7 +41,7 @@ using std::unique_ptr;
class XmlLayoutParser
{
public:
XmlLayoutParser(XmlTraitsParser& oXmlTraitsParser);
explicit XmlLayoutParser(XmlTraitsParser& oXmlTraitsParser);
void addXmlGameWidgetParser(unique_ptr<XmlGameWidgetParser> refXmlGameWidgetParser);
......
......@@ -37,7 +37,7 @@ using std::unique_ptr;
class XmlThemeImagesParser
{
public:
XmlThemeImagesParser(XmlConditionalParser& oXmlConditionalParser);
explicit XmlThemeImagesParser(XmlConditionalParser& oXmlConditionalParser);
~XmlThemeImagesParser();
void parseImages(ThemeCtx& oCtx, const xmlpp::Element* p0Element);
......
......@@ -41,6 +41,7 @@ XmlThemeLoader::XmlThemeLoader(const shared_ptr<AppConfig>& refAppConfig, const
, m_aAdditionalGameIds(aAdditionalGameIds)
, m_refGameDiskFiles(refGameDiskFiles)
, m_refXmlThemeParser(std::make_unique<XmlThemeParser>())
, m_bInfosLoaded(false)
, m_sDefaultThemeName(sDefaultThemeName)
{
assert(refAppConfig);
......@@ -80,6 +81,15 @@ void XmlThemeLoader::loadThemeInfos()
const std::vector<File>& aFiles = m_refGameDiskFiles->getThemeFiles();
//std::cout << "loadThemeInfos()" << '\n';
//std::cout << " PackageDataDir=" << libconfig::xml::getPackageDataDir() << '\n';
//const auto aDataDirs = libconfig::xml::getDataDirs();
//for (const std::string& sDataDir : aDataDirs) {
//std::cout << " DataDir=" << sDataDir << '\n';
//}
//for (const auto& oFile : aFiles) {
//std::cout << " Theme file: " << (oFile.isBuffered() ? "(buffer)" : oFile.getFullPath()) << '\n';
//}
Named oDummy;
for (auto oThemeFile : aFiles) {
......
......@@ -42,7 +42,7 @@ public:
/** Constructor.
* @param oInit The initialization parameters.
*/
BackgroundAnimation(const Init& oInit);
explicit BackgroundAnimation(const Init& oInit);
/** The current image id.
* @return The image id or -1 if not set.
*/
......
......@@ -35,7 +35,7 @@ public:
Tile m_oTile;/**< The tile that has to explode. Might be igored by view. Can be empty. */
int32_t m_nLevelPlayer = -1; /**< The controlling player if the tile belongs to a block or -1. Default is -1. */
};
ExplosionAnimation(const Init& oInit)
explicit ExplosionAnimation(const Init& oInit)
: LevelAnimation(oInit)
, m_oTile(oInit.m_oTile)
, m_nLevelPlayer(oInit.m_nLevelPlayer)
......
......@@ -36,7 +36,7 @@ public:
struct Init : public LevelAnimation::Init
{
};
ImageSequenceAnimation(const Init& oInit)
explicit ImageSequenceAnimation(const Init& oInit)
: LevelAnimation(oInit)
{
}
......
......@@ -59,7 +59,7 @@ public:
* Expects oInit.m_oSize to be defined (in tiles).
* @param oInit The initialization data.
*/
StaticGridAnimation(Init&& oInit);
explicit StaticGridAnimation(Init&& oInit);
inline const std::vector<ImageSpan>& getSpans() const { return m_oLocalInit.m_aSpans; }
inline NSize getGridCellsSize() const { return m_oLocalInit.m_oCellsSize; }
......
......@@ -43,11 +43,9 @@ public:
/** Constructor.
* @param oInit The initialization parameters.
*/
TextAnimation(Init&& oInit)
explicit TextAnimation(Init&& oInit)
: LevelAnimation(oInit)
, m_oLocalData(std::move(oInit))
// , m_aLines(oInit.m_aLines)
// , m_fFontHeight(oInit.m_fFontHeight)
{
}
......@@ -59,15 +57,11 @@ protected:
{
LevelAnimation::reInit(oInit);
m_oLocalData = std::move(oInit);
// m_aLines = oInit.m_aLines;
// m_fFontHeight = oInit.m_fFontHeight;
}
private:
friend class Level;
LocalInit m_oLocalData;
// std::vector<std::string> m_aLines;
// double m_fFontHeight; //TODO in what? tiles? pixels? (not in the model!)
};
......
......@@ -316,6 +316,7 @@ public:
#ifndef NDEBUG
void dump() const;
void dump(int32_t nIndent) const;
#endif //NDEBUG
private:
const std::vector<int32_t> shapeIdsAsVector() const;
......
......@@ -37,7 +37,7 @@ public:
/** Constructor.
* @param nAtLeastSize The indicative minimum number of unique values.
*/
Coords(int32_t nAtLeastSize);
explicit Coords(int32_t nAtLeastSize);
/** Clears the instance.
* All iterators become invalid.
......
......@@ -42,7 +42,7 @@ public:
* The event can only be added to the level passed as parameter to this function.
* @param oInit The initialization data.
*/
Event(Init&& oInit);
explicit Event(Init&& oInit);
protected:
/** Reinitialization.
* The event can only be added to the level passed as parameter to this function.
......
......@@ -77,7 +77,7 @@ public:
* to be \> 0.
* @param oInit Initialization data.
*/
AlarmsEvent(Init&& oInit);
explicit AlarmsEvent(Init&& oInit);
protected:
/** See constructor.
*/
......
......@@ -67,7 +67,7 @@ public:
/** Constructor.
* @param oInit The parameters.
*/
BackgroundEvent(Init&& oInit);
explicit BackgroundEvent(Init&& oInit);
protected:
/** See BackgroundEvent::BackgroundEvent().
*/
......
......@@ -60,7 +60,7 @@ public:
/** Constructor.
* @param oInit The initialization data.
*/
CumulCmpEvent(Init&& oInit);
explicit CumulCmpEvent(Init&& oInit);
protected:
/** See constructor.
*/
......
......@@ -43,7 +43,7 @@ public:
/** Constructor.
* @param oInit The initialization data.
*/
LogEvent(Init&& oInit);
explicit LogEvent(Init&& oInit);
protected:
/** Reinitialization.
* See LogEvent::LogEvent.
......
......@@ -35,7 +35,7 @@ public:
/** Constructor.
* @param oInit The initialization data.
*/
OthersReceiverEvent(Init&& oInit);
explicit OthersReceiverEvent(Init&& oInit);
protected:
void reInit(Init&& oInit);
public:
......@@ -61,7 +61,7 @@ public:
/** Constructor.
* @param oInit The initialization data.