code style changes

This commit is contained in:
Eric Levin 2015-06-02 12:51:45 -07:00
parent e7c5a24e3d
commit 55ffb7f1c0
6 changed files with 12 additions and 17 deletions

View file

@ -96,7 +96,7 @@ CONSTRUCT_PROPERTY(name, ENTITY_ITEM_DEFAULT_NAME),
CONSTRUCT_PROPERTY(backgroundMode, BACKGROUND_MODE_INHERIT),
CONSTRUCT_PROPERTY(sourceUrl, ""),
CONSTRUCT_PROPERTY(lineWidth, LineEntityItem::DEFAULT_LINE_WIDTH),
CONSTRUCT_PROPERTY(linePoints, 0),
CONSTRUCT_PROPERTY(linePoints, QVector<glm::vec3>()),
_id(UNKNOWN_ENTITY_ID),

View file

@ -50,8 +50,8 @@ EntityItemProperties LineEntityItem::getProperties() const {
properties._color = getXColor();
properties._colorChanged = false;
properties._lineWidth = getLineWidth();
properties._lineWidthChanged = false;
COPY_ENTITY_PROPERTY_TO_PROPERTIES(lineWidth, getLineWidth);
COPY_ENTITY_PROPERTY_TO_PROPERTIES(linePoints, getLinePoints);

View file

@ -383,12 +383,7 @@ bool OctreePacketData::appendValue(const glm::vec3& value) {
bool OctreePacketData::appendValue(const QVector<glm::vec3>& value) {
uint16_t qVecSize = value.size();
uint16_t sizeLength = sizeof(qVecSize);
bool success = append((const unsigned char*)&qVecSize, sizeLength);
if(success){
_bytesOfValues += sizeLength;
_totalBytesOfValues += sizeLength;
}
bool success = appendValue(qVecSize);
success = append((const unsigned char*)value.constData(), qVecSize * sizeof(glm::vec3));
if (success) {
_bytesOfValues += qVecSize * sizeof(glm::vec3);

View file

@ -82,7 +82,7 @@ QScriptValue qVectorVec3ToScriptValue(QScriptEngine* engine, const QVector<glm::
}
QVector<glm::vec3> qVectorVec3FromScriptValue(const QScriptValue& array){
QVector<glm::vec3> newVector(0);
QVector<glm::vec3> newVector;
int length = array.property("length").toInteger();
for (int i = 0; i < length; i++) {