[colobot] 138/145: Fixed colobot-lint warnings

Didier Raboud odyx at moszumanska.debian.org
Mon Jul 11 12:56:26 UTC 2016


This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 9e545d0d39077eac131a7d3fa9ddb51cb55adb41
Author: krzys-h <krzys_h at interia.pl>
Date:   Sat Jul 9 20:39:18 2016 +0200

    Fixed colobot-lint warnings
---
 src/CBot/CBotVar/CBotVarValue.h | 19 +++++++++++++++++++
 src/graphics/engine/camera.cpp  |  2 +-
 src/graphics/engine/engine.cpp  |  4 ++--
 src/level/robotmain.cpp         |  3 ++-
 4 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/src/CBot/CBotVar/CBotVarValue.h b/src/CBot/CBotVar/CBotVarValue.h
index 3e184d7..3fd1528 100644
--- a/src/CBot/CBotVar/CBotVarValue.h
+++ b/src/CBot/CBotVar/CBotVarValue.h
@@ -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"
diff --git a/src/graphics/engine/camera.cpp b/src/graphics/engine/camera.cpp
index 5f5c254..9f7fc40 100644
--- a/src/graphics/engine/camera.cpp
+++ b/src/graphics/engine/camera.cpp
@@ -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())
         {
diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index a6adbad..27d2db7 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -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] =
         {
diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp
index 2aab95c..75c12f8 100644
--- a/src/level/robotmain.cpp
+++ b/src/level/robotmain.cpp
@@ -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;
     });
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git



More information about the Pkg-games-commits mailing list