From 9098c3f73965b7a0e85f861fba6b07118fae2f9c Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Wed, 31 Oct 2012 16:09:22 -0700 Subject: [PATCH] Make the compiler happy. --- src/InstanceCounter.h | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/InstanceCounter.h b/src/InstanceCounter.h index 62c8b91ba6..ffb3665f55 100644 --- a/src/InstanceCounter.h +++ b/src/InstanceCounter.h @@ -6,15 +6,19 @@ #include -#define DEFINE_INSTANCE(x) \ - extern InstanceType IT_##x; \ - class Instance_##x : private Instance \ - { \ - protected: \ - Instance_##x() : Instance(IT_##x) { ; } \ +#define DEFINE_INSTANCE(x) \ + extern InstanceType IT_##x; \ + class Instance_##x : private Instance \ + { \ + protected: \ + Instance_##x() : Instance(IT_##x) { ; } \ + Instance_##x(const Instance_##x &) : \ + Instance(IT_##x) { ; } \ + Instance_##x& operator=(const Instance_##x&) \ + { return *this; } \ } -#define DECLARE_INSTANCE(x) \ +#define DECLARE_INSTANCE(x) \ InstanceType IT_##x(#x); #define IS_INSTANCE(x) Instance_##x