Fixed colobot-lint warnings
parent
8a17bc901c
commit
9e545d0d39
|
@ -1,3 +1,22 @@
|
|||
/*
|
||||
* This file is part of the Colobot: Gold Edition source code
|
||||
* Copyright (C) 2001-2016, Daniel Roux, EPSITEC SA & TerranovaTeam
|
||||
* http://epsitec.ch; http://colobot.info; http://github.com/colobot
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see http://gnu.org/licenses
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CBot/CBotVar/CBotVar.h"
|
||||
|
|
|
@ -254,7 +254,7 @@ CObject* CCamera::GetControllingObject()
|
|||
|
||||
void CCamera::SetType(CameraType type)
|
||||
{
|
||||
if ( (m_type == CAM_TYPE_BACK) )
|
||||
if (m_type == CAM_TYPE_BACK)
|
||||
{
|
||||
for (CObject* obj : CObjectManager::GetInstancePointer()->GetAllObjects())
|
||||
{
|
||||
|
|
|
@ -3510,7 +3510,7 @@ void CEngine::Capture3DScene()
|
|||
// calculate 2nd mipmap
|
||||
int newWidth = width / 4;
|
||||
int newHeight = height / 4;
|
||||
std::unique_ptr<unsigned char[]> mipmap(new unsigned char[4 * newWidth * newHeight]);
|
||||
std::unique_ptr<unsigned char[]> mipmap = MakeUniqueArray<unsigned char>(4 * newWidth * newHeight);
|
||||
|
||||
for (int x = 0; x < newWidth; x++)
|
||||
{
|
||||
|
@ -3539,7 +3539,7 @@ void CEngine::Capture3DScene()
|
|||
}
|
||||
|
||||
// calculate Gaussian blur
|
||||
std::unique_ptr<unsigned char[]> blured(new unsigned char[4 * newWidth * newHeight]);
|
||||
std::unique_ptr<unsigned char[]> blured = MakeUniqueArray<unsigned char>(4 * newWidth * newHeight);
|
||||
|
||||
float matrix[7][7] =
|
||||
{
|
||||
|
|
|
@ -5525,7 +5525,8 @@ void CRobotMain::AutosaveRotate()
|
|||
auto saveDirs = CResourceManager::ListDirectories(m_playerProfile->GetSaveDir());
|
||||
const std::string autosavePrefix = "autosave";
|
||||
std::vector<std::string> autosaves;
|
||||
std::copy_if(saveDirs.begin(), saveDirs.end(), std::back_inserter(autosaves), [&](const std::string &save) {
|
||||
std::copy_if(saveDirs.begin(), saveDirs.end(), std::back_inserter(autosaves), [&](const std::string &save)
|
||||
{
|
||||
return save.substr(0, autosavePrefix.length()) == autosavePrefix;
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue