OSDN Git Service

GLSL array type toString() implementation
authorRhys Weatherley <rhys.weatherley@nokia.com>
Wed, 1 Dec 2010 03:19:22 +0000 (13:19 +1000)
committerRhys Weatherley <rhys.weatherley@nokia.com>
Wed, 1 Dec 2010 03:19:22 +0000 (13:19 +1000)
src/libs/glsl/glsltypes.cpp
src/libs/glsl/glsltypes.h

index 555d183..c4f9e57 100644 (file)
@@ -309,6 +309,11 @@ bool MatrixType::isLessThan(const Type *other) const
     return false;
 }
 
+QString ArrayType::toString() const
+{
+    return elementType()->toString() + QLatin1String("[]");
+}
+
 bool ArrayType::isEqualTo(const Type *other) const
 {
     if (other) {
index 04559f2..fd0b934 100644 (file)
@@ -181,6 +181,7 @@ public:
 
     const Type *elementType() const { return indexElementType(); }
 
+    virtual QString toString() const;
     virtual const ArrayType *asArrayType() const { return this; }
     virtual bool isEqualTo(const Type *other) const;
     virtual bool isLessThan(const Type *other) const;