Use nullptr where possible instead of NULL or 0
[platform/upstream/glslang.git] / glslang / Include / ShHandle.h
index df07bd8..dee47c0 100644 (file)
@@ -58,9 +58,9 @@ class TShHandleBase {
 public:
     TShHandleBase() { pool = new glslang::TPoolAllocator; }
     virtual ~TShHandleBase() { delete pool; }
-    virtual TCompiler* getAsCompiler() { return 0; }
-    virtual TLinker* getAsLinker() { return 0; }
-    virtual TUniformMap* getAsUniformMap() { return 0; }
+    virtual TCompiler* getAsCompiler() { return nullptr; }
+    virtual TLinker* getAsLinker() { return nullptr; }
+    virtual TUniformMap* getAsUniformMap() { return nullptr; }
     virtual glslang::TPoolAllocator* getPool() const { return pool; }
 private:
     glslang::TPoolAllocator* pool;
@@ -123,11 +123,11 @@ public:
         infoSink(iSink),
         executable(e),
         haveReturnableObjectCode(false),
-        appAttributeBindings(0),
-        fixedAttributeBindings(0),
-        excludedAttributes(0),
+        appAttributeBindings(nullptr),
+        fixedAttributeBindings(nullptr),
+        excludedAttributes(nullptr),
         excludedCount(0),
-        uniformBindings(0) { }
+        uniformBindings(nullptr) { }
     virtual TLinker* getAsLinker() { return this; }
     virtual ~TLinker() { }
     virtual bool link(TCompilerList&, TUniformMap*) = 0;
@@ -137,7 +137,7 @@ public:
     virtual void getAttributeBindings(ShBindingTable const **t) const = 0;
     virtual void setExcludedAttributes(const int* attributes, int count) { excludedAttributes = attributes; excludedCount = count; }
     virtual ShBindingTable* getUniformBindings() const  { return uniformBindings; }
-    virtual const void* getObjectCode() const { return 0; } // a real compiler would be returning object code here
+    virtual const void* getObjectCode() const { return nullptr; } // a real compiler would be returning object code here
     virtual TInfoSink& getInfoSink() { return infoSink; }
     TInfoSink& infoSink;
 protected: