[colobot] 94/100: Fix clang builds

Didier Raboud odyx at moszumanska.debian.org
Thu Jun 1 18:10:24 UTC 2017


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

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

commit 28081bfd3ec1e1e15a00cd7260734280dd85cbc9
Author: krzys-h <krzys_h at interia.pl>
Date:   Wed May 24 13:58:57 2017 +0200

    Fix clang builds
    
    see #955
---
 src/CBot/CBotDefParam.cpp    | 1 -
 test/unit/CBot/CBot_test.cpp | 8 ++++----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/CBot/CBotDefParam.cpp b/src/CBot/CBotDefParam.cpp
index 074f025..b99503f 100644
--- a/src/CBot/CBotDefParam.cpp
+++ b/src/CBot/CBotDefParam.cpp
@@ -223,7 +223,6 @@ bool CBotDefParam::HasDefault()
 ////////////////////////////////////////////////////////////////////////////////
 void CBotDefParam::RestoreState(CBotStack* &pj, bool bMain)
 {
-    assert(this != nullptr);
     CBotDefParam*   p = this;
 
     CBotStack* pile = nullptr;
diff --git a/test/unit/CBot/CBot_test.cpp b/test/unit/CBot/CBot_test.cpp
index 5d3b72c..9e264e1 100644
--- a/test/unit/CBot/CBot_test.cpp
+++ b/test/unit/CBot/CBot_test.cpp
@@ -216,15 +216,15 @@ protected:
             if (error != CBotNoErr)
             {
                 ADD_FAILURE() << "Compile error - " << error << " (" << cursor1 << "-" << (cursor2 >= 0 ? cursor2 : cursor1) << ")" << std::endl << GetFormattedLineInfo(code, cursor1); // TODO: Error messages are on Colobot side
-                return std::move(program);
+                return program;
             }
             else
             {
                 ADD_FAILURE() << "No compile error, expected " << expectedCompileError; // TODO: Error messages are on Colobot side
-                return std::move(program);
+                return program;
             }
         }
-        if (expectedCompileError != CBotNoErr) return std::move(program);
+        if (expectedCompileError != CBotNoErr) return program;
 
         for (const std::string& test : tests)
         {
@@ -285,7 +285,7 @@ protected:
                 ADD_FAILURE() << ss.str();
             }
         }
-        return std::move(program); // Take it if you want, destroy on exit otherwise
+        return program; // Take it if you want, destroy on exit otherwise
     }
 };
 

-- 
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