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

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

commit f4614658cf06d641e4e5cbb51bd1f7224e5cadc3
Author: Abigail <abigailbuccan...@users.noreply.github.com>
Date:   Mon May 29 19:46:11 2017 +0100

    Fix -Wundefined-var-template warning (#963)
    
    This avoids specializing CSingleton<T>::m_instance for each type, and
    instead just defines it once in the header. This is allowed by the
    standard, multiple definitions are merged in the same way that inline
    functions are.
---
 src/app/app.cpp                | 3 ---
 src/app/input.cpp              | 3 ---
 src/app/pathman.cpp            | 2 --
 src/common/config_file.cpp     | 3 ---
 src/common/logger.cpp          | 4 ----
 src/common/settings.cpp        | 2 --
 src/common/singleton.h         | 1 +
 src/graphics/engine/engine.cpp | 2 --
 src/level/robotmain.cpp        | 3 ---
 src/object/object_manager.cpp  | 4 ----
 10 files changed, 1 insertion(+), 26 deletions(-)

diff --git a/src/app/app.cpp b/src/app/app.cpp
index f019ccc..c780e20 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -61,9 +61,6 @@
 #include <getopt.h>
 #include <localename.h>
 
-
-template<> CApplication* CSingleton<CApplication>::m_instance = nullptr;
-
 char CApplication::m_languageLocale[] = { 0 };
 
 
diff --git a/src/app/input.cpp b/src/app/input.cpp
index 87cedf3..142a455 100644
--- a/src/app/input.cpp
+++ b/src/app/input.cpp
@@ -32,9 +32,6 @@
 #include <boost/lexical_cast.hpp>
 #include <SDL_system.h>
 
-
-template<> CInput* CSingleton<CInput>::m_instance = nullptr;
-
 CInput::CInput()
     : m_keyPresses()
 {
diff --git a/src/app/pathman.cpp b/src/app/pathman.cpp
index a384828..c5f7e50 100644
--- a/src/app/pathman.cpp
+++ b/src/app/pathman.cpp
@@ -37,8 +37,6 @@
 #include <boost/algorithm/string.hpp>
 #include <boost/filesystem.hpp>
 
-template<> CPathManager* CSingleton<CPathManager>::m_instance = nullptr;
-
 CPathManager::CPathManager(CSystemUtils* systemUtils)
     : m_systemUtils(systemUtils)
 {
diff --git a/src/common/config_file.cpp b/src/common/config_file.cpp
index 6148eae..94496ca 100644
--- a/src/common/config_file.cpp
+++ b/src/common/config_file.cpp
@@ -34,9 +34,6 @@
 #include <boost/property_tree/ini_parser.hpp>
 #include <boost/regex.hpp>
 
-
-template<> CConfigFile* CSingleton<CConfigFile>::m_instance = nullptr;
-
 namespace bp = boost::property_tree;
 
 CConfigFile::CConfigFile()
diff --git a/src/common/logger.cpp b/src/common/logger.cpp
index b5e5b9c..ed9bdb5 100644
--- a/src/common/logger.cpp
+++ b/src/common/logger.cpp
@@ -22,10 +22,6 @@
 
 #include <stdio.h>
 
-
-template<> CLogger* CSingleton<CLogger>::m_instance = nullptr;
-
-
 CLogger::CLogger()
 {
     #if DEV_BUILD
diff --git a/src/common/settings.cpp b/src/common/settings.cpp
index 4519b07..8ebd55c 100644
--- a/src/common/settings.cpp
+++ b/src/common/settings.cpp
@@ -32,8 +32,6 @@
 
 #include "sound/sound.h"
 
-template<> CSettings* CSingleton<CSettings>::m_instance = nullptr;
-
 CSettings::CSettings()
 {
     m_tooltips       = true;
diff --git a/src/common/singleton.h b/src/common/singleton.h
index 005f524..254fc23 100644
--- a/src/common/singleton.h
+++ b/src/common/singleton.h
@@ -73,3 +73,4 @@ private:
     CSingleton(const CSingleton<T> &) = delete;
 };
 
+template <typename T> T* CSingleton<T>::m_instance = nullptr;
diff --git a/src/graphics/engine/engine.cpp b/src/graphics/engine/engine.cpp
index 943491b..0c80c30 100644
--- a/src/graphics/engine/engine.cpp
+++ b/src/graphics/engine/engine.cpp
@@ -64,8 +64,6 @@
 #include <SDL_surface.h>
 #include <SDL_thread.h>
 
-template<> Gfx::CEngine* CSingleton<Gfx::CEngine>::m_instance = nullptr;
-
 // Graphics module namespace
 namespace Gfx
 {
diff --git a/src/level/robotmain.cpp b/src/level/robotmain.cpp
index 6159652..5f932cb 100644
--- a/src/level/robotmain.cpp
+++ b/src/level/robotmain.cpp
@@ -125,9 +125,6 @@ const Gfx::Color COLOR_REF_ALIEN = 
Gfx::Color(135.0f/256.0f, 170.0f/256.0f,  13.
 const Gfx::Color COLOR_REF_GREEN = Gfx::Color(135.0f/256.0f, 170.0f/256.0f,  
13.0f/256.0f);  // green
 const Gfx::Color COLOR_REF_WATER = Gfx::Color( 25.0f/256.0f, 255.0f/256.0f, 
240.0f/256.0f);  // cyan
 
-
-template<> CRobotMain* CSingleton<CRobotMain>::m_instance = nullptr;
-
 //! Constructor of robot application
 CRobotMain::CRobotMain()
 {
diff --git a/src/object/object_manager.cpp b/src/object/object_manager.cpp
index a33a89f..e8323a5 100644
--- a/src/object/object_manager.cpp
+++ b/src/object/object_manager.cpp
@@ -36,10 +36,6 @@
 
 #include <algorithm>
 
-
-template<> CObjectManager* CSingleton<CObjectManager>::m_instance = nullptr;
-
-
 CObjectManager::CObjectManager(Gfx::CEngine* engine,
                                Gfx::CTerrain* terrain,
                                Gfx::COldModelManager* oldModelManager,

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

_______________________________________________
Pkg-games-commits mailing list
Pkg-games-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-games-commits

Reply via email to