From 8cb5717b86c11b841cd40bea0035eee1667ce0fc Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Wed, 27 May 2015 15:16:15 -0700 Subject: [PATCH] formatting, cleanups --- .../entities/src/EntityItemPropertiesMacros.h | 18 ------------- libraries/gpu/src/gpu/Resource.h | 26 +++++++++---------- libraries/model/src/model/Geometry.h | 2 +- 3 files changed, 14 insertions(+), 32 deletions(-) diff --git a/libraries/entities/src/EntityItemPropertiesMacros.h b/libraries/entities/src/EntityItemPropertiesMacros.h index 0fab1d7d06..33abc59e4d 100644 --- a/libraries/entities/src/EntityItemPropertiesMacros.h +++ b/libraries/entities/src/EntityItemPropertiesMacros.h @@ -97,14 +97,6 @@ inline QScriptValue convertScriptValue(QScriptEngine* e, const glm::quat& v) { r inline QScriptValue convertScriptValue(QScriptEngine* e, const QScriptValue& v) { return v; } inline QScriptValue convertScriptValue(QScriptEngine* e, const QByteArray& v) { - // return QScriptValue(QLatin1String(v.data())); - - // QScriptValue array = e->newArray(v.size()); - // for (int i = 0; i < v.size(); ++i) { - // array.setProperty(i, QScriptValue(e, (unsigned int) v[i])); - // } - // return array; - QByteArray b64 = v.toBase64(); return QScriptValue(QString(b64)); } @@ -149,17 +141,7 @@ inline QUuid QUuid_convertFromScriptValue(const QScriptValue& v, bool& isValid) inline QByteArray QByteArray_convertFromScriptValue(const QScriptValue& v, bool& isValid) { isValid = true; - // return v.toVariant().toByteArray(); - - // QByteArray byteArray; - // uint len = v.property("length").toUInt32(); - // byteArray.resize(len); - // for (uint i = 0; i < len; ++i) - // byteArray[i] = v.property(i).toUInt32(); - // return byteArray; - QString b64 = v.toVariant().toString().trimmed(); - return QByteArray::fromBase64(b64.toUtf8()); } diff --git a/libraries/gpu/src/gpu/Resource.h b/libraries/gpu/src/gpu/Resource.h index 846a416191..21202f9354 100644 --- a/libraries/gpu/src/gpu/Resource.h +++ b/libraries/gpu/src/gpu/Resource.h @@ -235,7 +235,7 @@ public: Iterator& operator=(const Iterator& iterator) = default; Iterator& operator=(T* ptr) { _ptr = ptr; - // stride is left unchanged + // stride is left unchanged return (*this); } @@ -257,42 +257,42 @@ public: } Iterator& operator+=(const Index& movement) { - movePtr(movement); + movePtr(movement); return (*this); } Iterator& operator-=(const Index& movement) { - movePtr(-movement); + movePtr(-movement); return (*this); } Iterator& operator++() { - movePtr(1); + movePtr(1); return (*this); } Iterator& operator--() { - movePtr(-1); - return (*this); + movePtr(-1); + return (*this); } Iterator operator++(Index) { auto temp(*this); - movePtr(1); - return temp; + movePtr(1); + return temp; } Iterator operator--(Index) { auto temp(*this); - movePtr(-1); - return temp; + movePtr(-1); + return temp; } Iterator operator+(const Index& movement) { auto oldPtr = _ptr; - movePtr(movement); + movePtr(movement); auto temp(*this); _ptr = oldPtr; return temp; } Iterator operator-(const Index& movement) { auto oldPtr = _ptr; - movePtr(-movement); - auto temp(*this); + movePtr(-movement); + auto temp(*this); _ptr = oldPtr; return temp; } diff --git a/libraries/model/src/model/Geometry.h b/libraries/model/src/model/Geometry.h index 736047e886..ddefaf4e96 100755 --- a/libraries/model/src/model/Geometry.h +++ b/libraries/model/src/model/Geometry.h @@ -52,7 +52,7 @@ public: // Attribute Buffers int getNumAttributes() const { return _attributeBuffers.size(); } void addAttribute(Slot slot, const BufferView& buffer); - const BufferView getAttributeBuffer(int attrib) const; + const BufferView getAttributeBuffer(int attrib) const; // Stream format const gpu::Stream::FormatPointer getVertexFormat() const { return _vertexFormat; }