Fix colobot-lint warnings

1008-fix
krzys-h 2018-04-20 01:31:11 +02:00
parent 1c2bdc9cab
commit e964d3e48c
11 changed files with 24 additions and 16 deletions

View File

@ -44,6 +44,7 @@ CSettings::CSettings()
m_fontSize = 19.0f;
m_windowPos = Math::Point(0.15f, 0.17f);
m_windowDim = Math::Point(0.70f, 0.66f);
m_windowMax = false;
m_IOPublic = false;
m_IODim = Math::Point(320.0f/640.0f, (121.0f+18.0f*8)/480.0f);

View File

@ -146,6 +146,7 @@ CEngine::CEngine(CApplication *app, CSystemUtils* systemUtils)
m_showStats = false;
m_focus = 0.75f;
m_hfov = 2.0f * atan((640.f/480.f) * tan(m_focus / 2.0f));
m_rankView = 0;

View File

@ -518,7 +518,8 @@ void CPlayerProfile::LoadScene(std::string dir)
CLevelParserLine* line = levelParser.Get("Mission");
cat = GetLevelCategoryFromDir(line->GetParam("base")->AsString());
if (dir == "../../crashsave") LoadFinishedLevels(cat);
if (dir == "../../crashsave")
LoadFinishedLevels(cat);
rank = line->GetParam("rank")->AsInt();
if (cat == LevelCategory::CustomLevels)

View File

@ -221,6 +221,8 @@ CRobotMain::CRobotMain()
m_resetCreate = false;
m_shortCut = true;
m_commandHistoryIndex = -1;
m_movieInfoIndex = -1;
m_tooltipPos = Math::Point(0.0f, 0.0f);
@ -4970,7 +4972,8 @@ Error CRobotMain::ProcessEndMissionTake()
text,
details,
false, true,
[&]() {
[&]()
{
ChangePhase(PHASE_WIN);
}
);
@ -5972,12 +5975,12 @@ bool CRobotMain::GetDebugCrashSpheres()
return m_debugCrashSpheres;
}
void CRobotMain::PushToCommandHistory(std::string str)
void CRobotMain::PushToCommandHistory(std::string cmd)
{
if (!m_commandHistory.empty() && m_commandHistory.front() == str) // already in history
if (!m_commandHistory.empty() && m_commandHistory.front() == cmd) // already in history
return;
m_commandHistory.push_front(str);
m_commandHistory.push_front(cmd);
if (m_commandHistory.size() > 50) // to avoid infinite growth
m_commandHistory.pop_back();

View File

@ -528,7 +528,7 @@ protected:
void UpdateDebugCrashSpheres();
//! Adds element to the beginning of command history
void PushToCommandHistory(std::string obj);
void PushToCommandHistory(std::string cmd);
//! Returns next/previous element from command history and updates index
//@{
std::string GetNextFromCommandHistory();

View File

@ -22,10 +22,10 @@
#include "common/restext.h"
#include "common/stringutils.h"
#include "level/parser/parserline.h"
#include "level/robotmain.h"
#include "level/parser/parserline.h"
#include "object/object.h"
#include "ui/displaytext.h"

View File

@ -115,7 +115,7 @@ public:
void AddPoints(int team, int points);
int GetScore(int team);
void SetScore(int team, int score);
void SetScore(int team, int points);
private:
std::vector<std::unique_ptr<CScoreboardKillRule>> m_rulesKill = {};

View File

@ -32,6 +32,7 @@
#include "object/object_create_params.h"
#include "object/object_interface_type.h"
#include "object/object_type.h"
#include "object/interface/destroyable_object.h"
#include <map>

View File

@ -138,6 +138,7 @@ COldObject::COldObject(int id)
m_virusTime = 0.0f;
m_lastVirusParticle = 0.0f;
m_damaging = false;
m_damageTime = 0.0f;
m_dying = DeathType::Alive;
m_bFlat = false;
m_gunGoalV = 0.0f;