Skip to content
Snippets Groups Projects
Commit 045c7fd5 authored by Rhys Weatherley's avatar Rhys Weatherley
Browse files

Fix vec and mat type names in tooltips

parent 814c9cc6
No related branches found
No related tags found
No related merge requests found
...@@ -141,16 +141,16 @@ bool DoubleType::isLessThan(const Type *other) const ...@@ -141,16 +141,16 @@ bool DoubleType::isLessThan(const Type *other) const
QString VectorType::toString() const QString VectorType::toString() const
{ {
QChar prefix; const char *prefix = "";
if (elementType()->asBoolType() != 0) if (elementType()->asBoolType() != 0)
prefix = QLatin1Char('b'); prefix = "b";
else if (elementType()->asIntType() != 0) else if (elementType()->asIntType() != 0)
prefix = QLatin1Char('i'); prefix = "i'";
else if (elementType()->asUIntType() != 0) else if (elementType()->asUIntType() != 0)
prefix = QLatin1Char('u'); prefix = "u";
else if (elementType()->asDoubleType() != 0) else if (elementType()->asDoubleType() != 0)
prefix = QLatin1Char('d'); prefix = "d";
return QString("%1vec%2").arg(prefix).arg(_dimension); return QString("%1vec%2").arg(QLatin1String(prefix)).arg(_dimension);
} }
void VectorType::add(Symbol *symbol) void VectorType::add(Symbol *symbol)
...@@ -265,16 +265,16 @@ bool VectorType::isLessThan(const Type *other) const ...@@ -265,16 +265,16 @@ bool VectorType::isLessThan(const Type *other) const
QString MatrixType::toString() const QString MatrixType::toString() const
{ {
QChar prefix; const char *prefix = "";
if (elementType()->asBoolType() != 0) if (elementType()->asBoolType() != 0)
prefix = QLatin1Char('b'); prefix = "b";
else if (elementType()->asIntType() != 0) else if (elementType()->asIntType() != 0)
prefix = QLatin1Char('i'); prefix = "i";
else if (elementType()->asUIntType() != 0) else if (elementType()->asUIntType() != 0)
prefix = QLatin1Char('u'); prefix = "u";
else if (elementType()->asDoubleType() != 0) else if (elementType()->asDoubleType() != 0)
prefix = QLatin1Char('d'); prefix = "d";
return QString("%1mat%2x%3").arg(prefix, _columns, _rows); return QString("%1mat%2x%3").arg(QLatin1String(prefix)).arg(_columns).arg(_rows);
} }
bool MatrixType::isEqualTo(const Type *other) const bool MatrixType::isEqualTo(const Type *other) const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment