diff --git a/src/libs/tgfdata/cars.cpp b/src/libs/tgfdata/cars.cpp index fd5ed6ec6..b8e8a58d9 100644 --- a/src/libs/tgfdata/cars.cpp +++ b/src/libs/tgfdata/cars.cpp @@ -280,15 +280,13 @@ void GfCar::load(void* hparmCar) // Drive train. const std::string strDriveTrain = - GfParmGetStr(hparmCar, SECT_DRIVETRAIN, PRM_TYPE, ""); + GfParmGetStr(hparmCar, SECT_DRIVETRAIN, PRM_TYPE, VAL_TRANS_RWD); if (strDriveTrain == VAL_TRANS_RWD) - _eDriveTrain = eRWD; + _eDriveTrain = TRANS_RWD; else if (strDriveTrain == VAL_TRANS_FWD) - _eDriveTrain = eFWD; + _eDriveTrain = TRANS_FWD; else if (strDriveTrain == VAL_TRANS_4WD) - _eDriveTrain = e4WD; - else - _eDriveTrain = eNDriveTrains; + _eDriveTrain = TRANS_4WD; // Number of gears. std::ostringstream ossSpecPath; @@ -488,7 +486,7 @@ const std::string& GfCar::getDescriptorFileName() const return _strDescFile; } -GfCar::EDriveTrain GfCar::getDriveTrain() const +tDriveType GfCar::getDriveTrain() const { return _eDriveTrain; } diff --git a/src/libs/tgfdata/cars.h b/src/libs/tgfdata/cars.h index 46336731c..f839e2f94 100644 --- a/src/libs/tgfdata/cars.h +++ b/src/libs/tgfdata/cars.h @@ -24,6 +24,7 @@ #include #include +#include #include "tgfdata.h" @@ -46,8 +47,7 @@ public: const std::string& getCategoryName() const; const std::string& getDescriptorFileName() const; - enum EDriveTrain { eRWD, eFWD, e4WD, eNDriveTrains }; - EDriveTrain getDriveTrain() const; + tDriveType getDriveTrain() const; unsigned getGearsCount() const; @@ -85,7 +85,7 @@ protected: std::string _strCatName; // User friendly category name (ex: "Long day Series GT1"). std::string _strDescFile; // Path-name of the XML descriptor file. - EDriveTrain _eDriveTrain; + tDriveType _eDriveTrain; unsigned _nGears; // Number of gears. bool _bTurboCharged; // TODO: Move to an enum (Turbo, Compressor, ...) tdble _fEngineCapacity; // litres diff --git a/src/modules/userinterface/legacymenu/racescreens/garagemenu.cpp b/src/modules/userinterface/legacymenu/racescreens/garagemenu.cpp index 3441b3ef3..dc3ae8f5f 100644 --- a/src/modules/userinterface/legacymenu/racescreens/garagemenu.cpp +++ b/src/modules/userinterface/legacymenu/racescreens/garagemenu.cpp @@ -261,8 +261,8 @@ GfCar* RmGarageMenu::resetCarModelComboBox(const std::string& strCatName, void RmGarageMenu::resetCarDataSheet(const std::string& strSelCarId) { - static const char* pszDriveWheels[GfCar::eNDriveTrains+1] = - { "Rear", "Front", "4", "?" }; + static const char* pszDriveWheels[3] = + { "Rear", "Front", "4" }; static const char* pszEnginePosition[GfCar::eNEnginePositions+1] = { "Front", "Front-mid", "Mid", "Rear-mid", "Rear", "?" }; static const char* pszEngineShape[GfCar::eNEngineShapes+1] =