Fix uninitialized reverse type

This commit is contained in:
Benau 2021-09-23 16:08:06 +08:00
parent 70070b3077
commit de52f2ae92
2 changed files with 7 additions and 1 deletions

View File

@ -47,6 +47,7 @@ GrandPrixData::GrandPrixData(const std::string& filename, enum GPGroupType group
m_id = StringUtils::getBasename(StringUtils::removeExtension(filename));
m_editable = (filename.find(file_manager->getGPDir(), 0) == 0);
m_group = group;
m_reverse_type = GP_NO_REVERSE;
reload();
} // GrandPrixData

View File

@ -104,7 +104,12 @@ public:
GrandPrixData(const std::string& filename, enum GPGroupType group);
/** Needed for simple creation of an instance of GrandPrixData */
GrandPrixData() {}
GrandPrixData()
{
m_editable = false;
m_group = GP_NONE;
m_reverse_type = GP_NO_REVERSE;
}
virtual ~GrandPrixData() {}
virtual std::vector<std::string> getTrackNames(const bool includeLocked=false) const;