summaryrefslogtreecommitdiffstats
path: root/source/Globals.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-16 14:42:35 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-02-16 14:42:35 +0100
commit423f49d175d8db6283232bd8bdc106e26bdcff4d (patch)
tree5c5cc58d1061c91d2cb39021853ce72ab59839ae /source/Globals.h
parentChunks are properly saved before being unloaded now (diff)
downloadcuberite-423f49d175d8db6283232bd8bdc106e26bdcff4d.tar
cuberite-423f49d175d8db6283232bd8bdc106e26bdcff4d.tar.gz
cuberite-423f49d175d8db6283232bd8bdc106e26bdcff4d.tar.bz2
cuberite-423f49d175d8db6283232bd8bdc106e26bdcff4d.tar.lz
cuberite-423f49d175d8db6283232bd8bdc106e26bdcff4d.tar.xz
cuberite-423f49d175d8db6283232bd8bdc106e26bdcff4d.tar.zst
cuberite-423f49d175d8db6283232bd8bdc106e26bdcff4d.zip
Diffstat (limited to '')
-rw-r--r--source/Globals.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/source/Globals.h b/source/Globals.h
index 2718b8509..b2a973cfd 100644
--- a/source/Globals.h
+++ b/source/Globals.h
@@ -12,12 +12,28 @@
#ifndef _MSC_VER
// Non-MS compilers don't know the override keyword
#define override
+#else
+ // MSVC produces warning C4481 on the override keyword usage, so disable the warning altogether
+ #pragma warning(disable:4481)
+
+ // Disable some warnings that we don't care about:
+ #pragma warning(disable:4100)
#endif // _MSC_VER
+// A macro to disallow the copy constructor and operator= functions
+// This should be used in the private: declarations for any class that shouldn't allow copying itself
+#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
+ TypeName(const TypeName &); \
+ void operator=(const TypeName &)
+
+
+
+
+
// OS-dependent stuff:
#ifdef _WIN32
#define WIN32_LEAN_AND_MEAN
@@ -114,8 +130,8 @@
-/// A generic interface used in ForEach() functions
-template <typename Type> class cListCallback
+/// A generic interface used mainly in ForEach() functions
+template <typename Type> class cItemCallback
{
public:
/// Called for each item in the internal list; return true to stop the loop, or false to continue enumerating