aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2012-06-07 18:11:38 +0200
committerJohannes Schickel2012-06-07 18:11:38 +0200
commit8e7f874db35395d100ca73d9433b25f2f7eae19d (patch)
tree2d6bf3c2b0d2479e7bd8ea6377d09c5f5fe989a5
parent27aa0974499c6012da894872913f4f44cf6b6a5c (diff)
downloadscummvm-rg350-8e7f874db35395d100ca73d9433b25f2f7eae19d.tar.gz
scummvm-rg350-8e7f874db35395d100ca73d9433b25f2f7eae19d.tar.bz2
scummvm-rg350-8e7f874db35395d100ca73d9433b25f2f7eae19d.zip
COMMON: Make CoroutineScheduler's constructor and destructor private.
CoroutineSchedule is a singleton, thus it should not be possible to create a custom instance of it.
-rw-r--r--common/coroutines.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/common/coroutines.h b/common/coroutines.h
index 3b8b1a77f9..64eabbf8f4 100644
--- a/common/coroutines.h
+++ b/common/coroutines.h
@@ -328,6 +328,18 @@ public:
typedef void (*VFPTRPP)(PROCESS *);
private:
+ friend class Singleton<CoroutineScheduler>;
+
+ /**
+ * Constructor
+ */
+ CoroutineScheduler();
+
+ /**
+ * Destructor
+ */
+ ~CoroutineScheduler();
+
/** list of all processes */
PROCESS *processList;
@@ -369,16 +381,6 @@ private:
EVENT *getEvent(uint32 pid);
public:
/**
- * Constructor
- */
- CoroutineScheduler();
-
- /**
- * Destructor
- */
- ~CoroutineScheduler();
-
- /**
* Kills all processes and places them on the free list.
*/
void reset();