* Move porting.h inclusion to engine.h, so most files will automatically include it.
* Make arguments passed as reference-to-CMMPointer and reference-to-string non-references, so temporary constructors can be used.
return 0;\r
}\r
\r
-bool CKernel::AddTask(CMMPointer<ITask> &t)\r
+bool CKernel::AddTask(CMMPointer<ITask> t)\r
{\r
if(!t->Start())return false;\r
\r
return true;\r
}\r
\r
-void CKernel::SuspendTask(CMMPointer<ITask> &t)\r
+void CKernel::SuspendTask(CMMPointer<ITask> t)\r
{\r
//check that this task is in our list - we don't want to suspend a task that isn't running\r
if(std::find(taskList.begin(),taskList.end(),t)!=taskList.end())\r
}\r
}\r
\r
-void CKernel::ResumeTask(CMMPointer<ITask> &t)\r
+void CKernel::ResumeTask(CMMPointer<ITask> t)\r
{\r
if(std::find(pausedTaskList.begin(),pausedTaskList.end(),t)!=pausedTaskList.end())\r
{\r
}\r
}\r
\r
-void CKernel::RemoveTask(CMMPointer<ITask> &t)\r
+void CKernel::RemoveTask(CMMPointer<ITask> t)\r
{\r
if(std::find(taskList.begin(),taskList.end(),t)!=taskList.end())\r
{\r
\r
int Execute();\r
\r
-#ifdef WIN32\r
- bool AddTask(CMMPointer<ITask> &t);\r
-#else\r
bool AddTask(CMMPointer<ITask> t);\r
-#endif\r
- void SuspendTask(CMMPointer<ITask> &t);\r
- void ResumeTask(CMMPointer<ITask> &t);\r
- void RemoveTask(CMMPointer<ITask> &t);\r
+ void SuspendTask(CMMPointer<ITask> t);\r
+ void ResumeTask(CMMPointer<ITask> t);\r
+ void RemoveTask(CMMPointer<ITask> t);\r
void KillAllTasks();\r
\r
protected:\r
//////////////////////////////////////////////////////////////////////\r
\r
#include <stdarg.h>\r
-#include "porting.h"\r
#include "engine.h"\r
#include "Log.h"\r
\r
DestroyStandardSettings();\r
}\r
\r
-void CSettingsManager::RegisterVariable(std::string &name, CMMPointer<BaseDator> &var)\r
+void CSettingsManager::RegisterVariable(std::string name, CMMPointer<BaseDator> var)\r
{\r
settingMap[name]=var;\r
}\r
CSettingsManager();\r
virtual ~CSettingsManager();\r
\r
- void RegisterVariable(std::string &name, CMMPointer<BaseDator> &var);\r
+ void RegisterVariable(std::string name, CMMPointer<BaseDator> var);\r
void SetVariable(std::string &name, std::string &value, int bias=0);\r
\r
void CreateStandardSettings();\r
#ifdef WIN32\r
#include <windows.h>\r
#endif\r
+#include "porting.h"\r
\r
//even though resource.h is technically a Win32-resource file, it's just a bunch of defines, so it's ok (and necessary)\r
#include "resource.h"\r
-CFLAGS:=-I.
-OBJS:=main.o Engine/Log.o SchemeReader.o
+CFLAGS:=-I. -fno-elide-constructors -fms-extensions -fpermissive
+OBJS:=main.o Engine/Log.o SchemeReader.o Engine/Settings.o
all: $(OBJS)
+link: all
+ g++ $(OBJS)
+
%.o: %.cpp
g++ $(CFLAGS) -c $< -o $@
#ifndef WIN32
#define vsprintf_s vsnprintf
+ #define sprintf_s snprintf
#endif // !WIN32