OSDN Git Service

Android build fix
authorAlexis Hetu <sugoi@google.com>
Wed, 28 Sep 2016 19:52:21 +0000 (15:52 -0400)
committerAlexis Hétu <sugoi@google.com>
Wed, 28 Sep 2016 19:53:08 +0000 (19:53 +0000)
"false" could not be converted to a pointer type. Changed it to nullptr.
Also changed a few other "return 0" to "return nullptr".

Change-Id: Idd4573d4627bb89f1b79e3b21de5af5bd6063916
Reviewed-on: https://swiftshader-review.googlesource.com/7357
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
src/OpenGL/compiler/ParseHelper.cpp

index 645f490..37d4eed 100644 (file)
@@ -1170,12 +1170,12 @@ const TFunction* TParseContext::findFunction(const TSourceLoc &line, TFunction*
 
        if (symbol == 0) {
                error(line, "no matching overloaded function found", call->getName().c_str());
-               return 0;
+               return nullptr;
        }
 
        if (!symbol->isFunction()) {
                error(line, "function name expected", call->getName().c_str());
-               return 0;
+               return nullptr;
        }
 
        return static_cast<const TFunction*>(symbol);
@@ -2088,7 +2088,7 @@ TIntermTyped* TParseContext::addConstructor(TIntermNode* arguments, const TType*
                        if(!argType.sameElementType(*type))
                        {
                                error(line, "Array constructor argument has an incorrect type", "Error");
-                               return false;
+                               return nullptr;
                        }
                }
        }
@@ -2104,7 +2104,7 @@ TIntermTyped* TParseContext::addConstructor(TIntermNode* arguments, const TType*
                                error(line, "Structure constructor arguments do not match structure fields", "Error");
                                recover();
 
-                               return 0;
+                               return nullptr;
                        }
                }
        }
@@ -2133,12 +2133,12 @@ TIntermTyped* TParseContext::foldConstConstructor(TIntermAggregate* aggrNode, co
                        returnVal = intermediate.parseConstTree(aggrNode->getLine(), aggrNode, unionArray, aggrNode->getOp(), type);
                }
                if (returnVal)
-                       return 0;
+                       return nullptr;
 
                return intermediate.addConstantUnion(unionArray, type, aggrNode->getLine());
        }
 
-       return 0;
+       return nullptr;
 }
 
 //
@@ -2164,7 +2164,7 @@ TIntermTyped* TParseContext::addConstVectorNode(TVectorFields& fields, TIntermTy
                error(line, "Cannot offset into the vector", "Error");
                recover();
 
-               return 0;
+               return nullptr;
        }
 
        ConstantUnion* constArray = new ConstantUnion[fields.num];
@@ -2215,7 +2215,7 @@ TIntermTyped* TParseContext::addConstMatrixNode(int index, TIntermTyped* node, c
                error(line, "Cannot offset into the matrix", "Error");
                recover();
 
-               return 0;
+               return nullptr;
        }
 
        return typedNode;
@@ -2253,7 +2253,7 @@ TIntermTyped* TParseContext::addConstArrayNode(int index, TIntermTyped* node, co
                error(line, "Cannot offset into the array", "Error");
                recover();
 
-               return 0;
+               return nullptr;
        }
 
        return typedNode;
@@ -2288,7 +2288,7 @@ TIntermTyped* TParseContext::addConstStruct(const TString& identifier, TIntermTy
                error(line, "Cannot offset into the structure", "Error");
                recover();
 
-               return 0;
+               return nullptr;
        }
 
        return typedNode;