]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/parsermode.h
Use nullptr instead of 0 for pointers
[libs/datafile.git] / source / parsermode.h
index 491647e4b09a0b9c307d4f4aa32a6078403ed9a5..9d47ae422f8753bfb7a7a16f401e40b615a43729 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef MSP_DATAFILE_PARSERMODE_H_
 #define MSP_DATAFILE_PARSERMODE_H_
 
+#include <msp/core/noncopyable.h>
 #include "statement.h"
 
 namespace Msp {
@@ -13,7 +14,7 @@ class LoaderAction;
 /**
 Base class for parse modes.
 */
-class ParserMode
+class ParserMode: private NonCopyable
 {
 protected:
        Input &in;
@@ -26,7 +27,7 @@ public:
        virtual Statement parse() = 0;
        virtual void process_control_statement(const Statement &) { }
 
-       virtual const StatementKey *peek(unsigned) { return 0; }
+       virtual const StatementKey *peek(unsigned) { return nullptr; }
        virtual bool parse_and_load(unsigned, Loader &, const LoaderAction &) { return false; }
 };