diff options
Diffstat (limited to 'indra/llprimitive')
-rw-r--r-- | indra/llprimitive/CMakeLists.txt | 1 | ||||
-rw-r--r-- | indra/llprimitive/lldaeloader.cpp | 134 | ||||
-rw-r--r-- | indra/llprimitive/llgltfmaterial.cpp | 8 | ||||
-rw-r--r-- | indra/llprimitive/llmaterialid.cpp | 2 | ||||
-rw-r--r-- | indra/llprimitive/llmodel.cpp | 10 | ||||
-rw-r--r-- | indra/llprimitive/llprimitive.cpp | 2 | ||||
-rw-r--r-- | indra/llprimitive/lltreeparams.cpp | 2 | ||||
-rw-r--r-- | indra/llprimitive/tests/llmediaentry_test.cpp | 9 |
8 files changed, 77 insertions, 91 deletions
diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt index 972f502aa9..19a43839af 100644 --- a/indra/llprimitive/CMakeLists.txt +++ b/indra/llprimitive/CMakeLists.txt @@ -70,7 +70,6 @@ target_link_libraries(llprimitive llrender llphysicsextensions_impl ll::colladadom - ll::pcre ll::glh_linear ) diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp index 1480322935..4f47f16e33 100644 --- a/indra/llprimitive/lldaeloader.cpp +++ b/indra/llprimitive/lldaeloader.cpp @@ -24,10 +24,8 @@ * $/LicenseInfo$ */ -#if LL_MSVC -#pragma warning (disable : 4263) -#pragma warning (disable : 4264) -#endif +#include "linden_common.h" + #include "dae.h" #include "dom/domAsset.h" #include "dom/domBind_material.h" @@ -48,10 +46,6 @@ #include "dom/domScale.h" #include "dom/domTranslate.h" #include "dom/domVisual_scene.h" -#if LL_MSVC -#pragma warning (default : 4263) -#pragma warning (default : 4264) -#endif #include "lldaeloader.h" #include "llsdserialize.h" @@ -107,7 +101,7 @@ bool get_dom_sources(const domInputLocalOffset_Array& inputs, S32& pos_offset, S { if (strcmp(COMMON_PROFILE_INPUT_POSITION, v_inp[k]->getSemantic()) == 0) { - pos_offset = inputs[j]->getOffset(); + pos_offset = (S32)inputs[j]->getOffset(); const domURIFragmentType& uri = v_inp[k]->getSource(); daeElementRef elem = uri.getElement(); @@ -116,7 +110,7 @@ bool get_dom_sources(const domInputLocalOffset_Array& inputs, S32& pos_offset, S if (strcmp(COMMON_PROFILE_INPUT_NORMAL, v_inp[k]->getSemantic()) == 0) { - norm_offset = inputs[j]->getOffset(); + norm_offset = (S32)inputs[j]->getOffset(); const domURIFragmentType& uri = v_inp[k]->getSource(); daeElementRef elem = uri.getElement(); @@ -128,14 +122,14 @@ bool get_dom_sources(const domInputLocalOffset_Array& inputs, S32& pos_offset, S if (strcmp(COMMON_PROFILE_INPUT_NORMAL, inputs[j]->getSemantic()) == 0) { //found normal array for this triangle list - norm_offset = inputs[j]->getOffset(); + norm_offset = (S32)inputs[j]->getOffset(); const domURIFragmentType& uri = inputs[j]->getSource(); daeElementRef elem = uri.getElement(); norm_source = (domSource*) elem.cast(); } else if (strcmp(COMMON_PROFILE_INPUT_TEXCOORD, inputs[j]->getSemantic()) == 0) { //found texCoords - tc_offset = inputs[j]->getOffset(); + tc_offset = (S32)inputs[j]->getOffset(); const domURIFragmentType& uri = inputs[j]->getSource(); daeElementRef elem = uri.getElement(); tc_source = (domSource*) elem.cast(); @@ -201,8 +195,8 @@ LLModel::EModelStatus load_face_from_dom_triangles( return LLModel::BAD_ELEMENT; } // VFExtents change - face.mExtents[0].set(v[0], v[1], v[2]); - face.mExtents[1].set(v[0], v[1], v[2]); + face.mExtents[0].set((F32)v[0], (F32)v[1], (F32)v[2]); + face.mExtents[1].set((F32)v[0], (F32)v[1], (F32)v[2]); } LLVolumeFace::VertexMapData::PointMap point_map; @@ -223,22 +217,22 @@ LLModel::EModelStatus load_face_from_dom_triangles( LLVolumeFace::VertexData cv; if (pos_source) { - cv.setPosition(LLVector4a(v[idx[i+pos_offset]*3+0], - v[idx[i+pos_offset]*3+1], - v[idx[i+pos_offset]*3+2])); + cv.setPosition(LLVector4a((F32)v[idx[i+pos_offset]*3+0], + (F32)v[idx[i+pos_offset]*3+1], + (F32)v[idx[i+pos_offset]*3+2])); } if (tc_source) { - cv.mTexCoord.setVec(tc[idx[i+tc_offset]*2+0], - tc[idx[i+tc_offset]*2+1]); + cv.mTexCoord.setVec((F32)tc[idx[i+tc_offset]*2+0], + (F32)tc[idx[i+tc_offset]*2+1]); } if (norm_source) { - cv.setNormal(LLVector4a(n[idx[i+norm_offset]*3+0], - n[idx[i+norm_offset]*3+1], - n[idx[i+norm_offset]*3+2])); + cv.setNormal(LLVector4a((F32)n[idx[i+norm_offset]*3+0], + (F32)n[idx[i+norm_offset]*3+1], + (F32)n[idx[i+norm_offset]*3+2])); } bool found = false; @@ -326,8 +320,8 @@ LLModel::EModelStatus load_face_from_dom_triangles( face = LLVolumeFace(); // VFExtents change - face.mExtents[0].set(v[0], v[1], v[2]); - face.mExtents[1].set(v[0], v[1], v[2]); + face.mExtents[0].set((F32)v[0], (F32)v[1], (F32)v[2]); + face.mExtents[1].set((F32)v[0], (F32)v[1], (F32)v[2]); verts.clear(); indices.clear(); @@ -416,8 +410,8 @@ LLModel::EModelStatus load_face_from_dom_polylist( { v = pos_source->getFloat_array()->getValue(); // VFExtents change - face.mExtents[0].set(v[0], v[1], v[2]); - face.mExtents[1].set(v[0], v[1], v[2]); + face.mExtents[0].set((F32)v[0], (F32)v[1], (F32)v[2]); + face.mExtents[1].set((F32)v[0], (F32)v[1], (F32)v[2]); } if (tc_source) @@ -445,9 +439,9 @@ LLModel::EModelStatus load_face_from_dom_polylist( if (pos_source) { - cv.getPosition().set(v[idx[cur_idx+pos_offset]*3+0], - v[idx[cur_idx+pos_offset]*3+1], - v[idx[cur_idx+pos_offset]*3+2]); + cv.getPosition().set((F32)v[idx[cur_idx+pos_offset]*3+0], + (F32)v[idx[cur_idx+pos_offset]*3+1], + (F32)v[idx[cur_idx+pos_offset]*3+2]); if (!cv.getPosition().isFinite3()) { LL_WARNS() << "Found NaN while loading position data from DAE-Model, invalid model." << LL_ENDL; @@ -465,7 +459,7 @@ LLModel::EModelStatus load_face_from_dom_polylist( if (idx_y < tc.getCount()) { - cv.mTexCoord.setVec(tc[idx_x], tc[idx_y]); + cv.mTexCoord.setVec((F32)tc[idx_x], (F32)tc[idx_y]); } else if (log_tc_msg) { @@ -479,9 +473,9 @@ LLModel::EModelStatus load_face_from_dom_polylist( if (norm_source) { - cv.getNormal().set(n[idx[cur_idx+norm_offset]*3+0], - n[idx[cur_idx+norm_offset]*3+1], - n[idx[cur_idx+norm_offset]*3+2]); + cv.getNormal().set((F32)n[idx[cur_idx+norm_offset]*3+0], + (F32)n[idx[cur_idx+norm_offset]*3+1], + (F32)n[idx[cur_idx+norm_offset]*3+2]); if (!cv.getNormal().isFinite3()) { @@ -607,8 +601,8 @@ LLModel::EModelStatus load_face_from_dom_polylist( face = LLVolumeFace(); // VFExtents change - face.mExtents[0].set(v[0], v[1], v[2]); - face.mExtents[1].set(v[0], v[1], v[2]); + face.mExtents[0].set((F32)v[0], (F32)v[1], (F32)v[2]); + face.mExtents[1].set((F32)v[0], (F32)v[1], (F32)v[2]); verts.clear(); indices.clear(); point_map.clear(); @@ -669,7 +663,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac if (strcmp(COMMON_PROFILE_INPUT_VERTEX, inputs[i]->getSemantic()) == 0) { //found vertex array - v_offset = inputs[i]->getOffset(); + v_offset = (S32)inputs[i]->getOffset(); const domURIFragmentType& uri = inputs[i]->getSource(); daeElementRef elem = uri.getElement(); @@ -697,7 +691,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac } else if (strcmp(COMMON_PROFILE_INPUT_NORMAL, inputs[i]->getSemantic()) == 0) { - n_offset = inputs[i]->getOffset(); + n_offset = (S32)inputs[i]->getOffset(); //found normal array for this triangle list const domURIFragmentType& uri = inputs[i]->getSource(); daeElementRef elem = uri.getElement(); @@ -710,7 +704,7 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac } else if (strcmp(COMMON_PROFILE_INPUT_TEXCOORD, inputs[i]->getSemantic()) == 0 && inputs[i]->getSet() == 0) { //found texCoords - t_offset = inputs[i]->getOffset(); + t_offset = (S32)inputs[i]->getOffset(); const domURIFragmentType& uri = inputs[i]->getSource(); daeElementRef elem = uri.getElement(); domSource* src = (domSource*) elem.cast(); @@ -745,11 +739,11 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac if (v) { - U32 v_idx = idx[j*stride+v_offset]*3; + U32 v_idx = (U32)idx[j*stride+v_offset]*3; v_idx = llclamp(v_idx, (U32) 0, (U32) v->getCount()); - vert.getPosition().set(v->get(v_idx), - v->get(v_idx+1), - v->get(v_idx+2)); + vert.getPosition().set((F32)v->get(v_idx), + (F32)v->get(v_idx+1), + (F32)v->get(v_idx+2)); } //bounds check n and t lookups because some FBX to DAE converters @@ -757,11 +751,11 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac //for a particular channel if (n && n->getCount() > 0) { - U32 n_idx = idx[j*stride+n_offset]*3; + U32 n_idx = (U32)idx[j*stride+n_offset]*3; n_idx = llclamp(n_idx, (U32) 0, (U32) n->getCount()); - vert.getNormal().set(n->get(n_idx), - n->get(n_idx+1), - n->get(n_idx+2)); + vert.getNormal().set((F32)n->get(n_idx), + (F32)n->get(n_idx+1), + (F32)n->get(n_idx+2)); } else { @@ -771,10 +765,10 @@ LLModel::EModelStatus load_face_from_dom_polygons(std::vector<LLVolumeFace>& fac if (t && t->getCount() > 0) { - U32 t_idx = idx[j*stride+t_offset]*2; + U32 t_idx = (U32)idx[j*stride+t_offset]*2; t_idx = llclamp(t_idx, (U32) 0, (U32) t->getCount()); - vert.mTexCoord.setVec(t->get(t_idx), - t->get(t_idx+1)); + vert.mTexCoord.setVec((F32)t->get(t_idx), + (F32)t->get(t_idx+1)); } else { @@ -1026,7 +1020,7 @@ bool LLDAELoader::OpenFile(const std::string& filename) if (unit) { - F32 meter = unit->getMeter(); + F32 meter = (F32)unit->getMeter(); mTransform.mMatrix[0][0] = meter; mTransform.mMatrix[1][1] = meter; mTransform.mMatrix[2][2] = meter; @@ -1241,7 +1235,7 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do { for(int j = 0; j < 4; j++) { - mat.mMatrix[i][j] = dom_value[i + j*4]; + mat.mMatrix[i][j] = (F32)dom_value[i + j*4]; } } @@ -1463,7 +1457,7 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do { for(int j = 0; j < 4; j++) { - mat.mMatrix[i][j] = transform[k*16 + i + j*4]; + mat.mMatrix[i][j] = (F32)transform[k*16 + i + j*4]; } } model->mSkinInfo.mInvBindMatrix.push_back(LLMatrix4a(mat)); @@ -1581,7 +1575,7 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do LL_ERRS() << "Invalid position array size." << LL_ENDL; } - LLVector3 v(pos[j], pos[j+1], pos[j+2]); + LLVector3 v((F32)pos[j], (F32)pos[j+1], (F32)pos[j+2]); //transform from COLLADA space to volume space v = v * inverse_normalized_transformation; @@ -1621,15 +1615,15 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do U32 c_idx = 0; for (size_t vc_idx = 0; vc_idx < vcount.getCount(); ++vc_idx) { //for each vertex - daeUInt count = vcount[vc_idx]; + daeUInt count = (daeUInt)vcount[vc_idx]; //create list of weights that influence this vertex LLModel::weight_list weight_list; for (daeUInt i = 0; i < count; ++i) { //for each weight - daeInt joint_idx = v[c_idx++]; - daeInt weight_idx = v[c_idx++]; + daeInt joint_idx = (daeInt)v[c_idx++]; + daeInt weight_idx = (daeInt)v[c_idx++]; if (joint_idx == -1) { @@ -1637,7 +1631,7 @@ void LLDAELoader::processDomModel(LLModel* model, DAE* dae, daeElement* root, do continue; } - F32 weight_value = w[weight_idx]; + F32 weight_value = (F32)w[weight_idx]; weight_list.push_back(LLModel::JointWeight(joint_idx, weight_value)); } @@ -1807,7 +1801,7 @@ bool LLDAELoader::verifyController( domController* pController ) { //Skin is reference directly by geometry and get the vertex count from skin domSkin::domVertex_weights* pVertexWeights = pSkin->getVertex_weights(); - U32 vertexWeightsCount = pVertexWeights->getCount(); + U32 vertexWeightsCount = (U32)pVertexWeights->getCount(); domGeometry* pGeometry = (domGeometry*) (domElement*) uri.getElement(); domMesh* pMesh = pGeometry->getMesh(); @@ -1825,7 +1819,7 @@ bool LLDAELoader::verifyController( domController* pController ) { xsAnyURI src = pVertices->getInput_array()[0]->getSource(); domSource* pSource = (domSource*) (domElement*) src.getElement(); - U32 verticesCount = pSource->getTechnique_common()->getAccessor()->getCount(); + U32 verticesCount = (U32)pSource->getTechnique_common()->getAccessor()->getCount(); result = verifyCount( verticesCount, vertexWeightsCount ); if ( !result ) { @@ -1845,7 +1839,7 @@ bool LLDAELoader::verifyController( domController* pController ) U32 sum = 0; for (size_t i=0; i<vcountCount; i++) { - sum += pVertexWeights->getVcount()->getValue()[i]; + sum += (U32)pVertexWeights->getVcount()->getValue()[i]; } result = verifyCount( sum * static_cast<U32>(inputs.getCount()), (domInt) static_cast<int>(pVertexWeights->getV()->getValue().getCount()) ); } @@ -1860,7 +1854,7 @@ bool LLDAELoader::verifyController( domController* pController ) void LLDAELoader::extractTranslation( domTranslate* pTranslate, LLMatrix4& transform ) { domFloat3 jointTrans = pTranslate->getValue(); - LLVector3 singleJointTranslation( jointTrans[0], jointTrans[1], jointTrans[2] ); + LLVector3 singleJointTranslation((F32)jointTrans[0], (F32)jointTrans[1], (F32)jointTrans[2]); transform.setTranslation( singleJointTranslation ); } //----------------------------------------------------------------------------- @@ -1872,7 +1866,7 @@ void LLDAELoader::extractTranslationViaElement( daeElement* pTranslateElement, L { domTranslate* pTranslateChild = static_cast<domTranslate*>( pTranslateElement ); domFloat3 translateChild = pTranslateChild->getValue(); - LLVector3 singleJointTranslation( translateChild[0], translateChild[1], translateChild[2] ); + LLVector3 singleJointTranslation((F32)translateChild[0], (F32)translateChild[1], (F32)translateChild[2]); transform.setTranslation( singleJointTranslation ); } } @@ -1894,7 +1888,7 @@ void LLDAELoader::extractTranslationViaSID( daeElement* pElement, LLMatrix4& tra { for( int j = 0; j < 4; j++ ) { - workingTransform.mMatrix[i][j] = domArray[i + j*4]; + workingTransform.mMatrix[i][j] = (F32)domArray[i + j*4]; } } LLVector3 trans = workingTransform.getTranslation(); @@ -1957,7 +1951,7 @@ void LLDAELoader::processJointNode( domNode* pNode, JointTransformMap& jointTran { for (int j = 0; j < 4; j++) { - workingTransform.mMatrix[i][j] = domArray[i + j * 4]; + workingTransform.mMatrix[i][j] = (F32)domArray[i + j * 4]; } } } @@ -2023,7 +2017,7 @@ void LLDAELoader::processElement( daeElement* element, bool& badElement, DAE* da domFloat3 dom_value = translate->getValue(); LLMatrix4 translation; - translation.setTranslation(LLVector3(dom_value[0], dom_value[1], dom_value[2])); + translation.setTranslation(LLVector3((F32)dom_value[0], (F32)dom_value[1], (F32)dom_value[2])); translation *= mTransform; mTransform = translation; @@ -2036,7 +2030,7 @@ void LLDAELoader::processElement( daeElement* element, bool& badElement, DAE* da domFloat4 dom_value = rotate->getValue(); LLMatrix4 rotation; - rotation.initRotTrans(dom_value[3] * DEG_TO_RAD, LLVector3(dom_value[0], dom_value[1], dom_value[2]), LLVector3(0, 0, 0)); + rotation.initRotTrans((F32)dom_value[3] * DEG_TO_RAD, LLVector3((F32)dom_value[0], (F32)dom_value[1], (F32)dom_value[2]), LLVector3(0, 0, 0)); rotation *= mTransform; mTransform = rotation; @@ -2049,7 +2043,7 @@ void LLDAELoader::processElement( daeElement* element, bool& badElement, DAE* da domFloat3 dom_value = scale->getValue(); - LLVector3 scale_vector = LLVector3(dom_value[0], dom_value[1], dom_value[2]); + LLVector3 scale_vector = LLVector3((F32)dom_value[0], (F32)dom_value[1], (F32)dom_value[2]); scale_vector.abs(); // Set all values positive, since we don't currently support mirrored meshes LLMatrix4 scaling; scaling.initScale(scale_vector); @@ -2070,7 +2064,7 @@ void LLDAELoader::processElement( daeElement* element, bool& badElement, DAE* da { for(int j = 0; j < 4; j++) { - matrix_transform.mMatrix[i][j] = dom_value[i + j*4]; + matrix_transform.mMatrix[i][j] = (F32)dom_value[i + j*4]; } } @@ -2338,7 +2332,7 @@ LLImportMaterial LLDAELoader::profileToMaterial(domProfile_COMMON* material, DAE if (color) { domFx_color_common domfx_color = color->getValue(); - LLColor4 value = LLColor4(domfx_color[0], domfx_color[1], domfx_color[2], domfx_color[3]); + LLColor4 value = LLColor4((F32)domfx_color[0], (F32)domfx_color[1], (F32)domfx_color[2], (F32)domfx_color[3]); mat.mDiffuseColor = value; } } @@ -2450,7 +2444,7 @@ LLColor4 LLDAELoader::getDaeColor(daeElement* element) if (color) { domFx_color_common domfx_color = color->getValue(); - value = LLColor4(domfx_color[0], domfx_color[1], domfx_color[2], domfx_color[3]); + value = LLColor4((F32)domfx_color[0], (F32)domfx_color[1], (F32)domfx_color[2], (F32)domfx_color[3]); } return value; diff --git a/indra/llprimitive/llgltfmaterial.cpp b/indra/llprimitive/llgltfmaterial.cpp index e8c9af5ea3..cc4921416f 100644 --- a/indra/llprimitive/llgltfmaterial.cpp +++ b/indra/llprimitive/llgltfmaterial.cpp @@ -790,7 +790,7 @@ void LLGLTFMaterial::applyOverrideLLSD(const LLSD& data) const LLSD& mf = data["mf"]; if (mf.isReal()) { - mMetallicFactor = mf.asReal(); + mMetallicFactor = (F32)mf.asReal(); if (mMetallicFactor == getDefaultMetallicFactor()) { // HACK -- nudge by epsilon if we receive a default value (indicates override to default) @@ -801,7 +801,7 @@ void LLGLTFMaterial::applyOverrideLLSD(const LLSD& data) const LLSD& rf = data["rf"]; if (rf.isReal()) { - mRoughnessFactor = rf.asReal(); + mRoughnessFactor = (F32)rf.asReal(); if (mRoughnessFactor == getDefaultRoughnessFactor()) { // HACK -- nudge by epsilon if we receive a default value (indicates override to default) @@ -819,7 +819,7 @@ void LLGLTFMaterial::applyOverrideLLSD(const LLSD& data) const LLSD& ac = data["ac"]; if (ac.isReal()) { - mAlphaCutoff = ac.asReal(); + mAlphaCutoff = (F32)ac.asReal(); if (mAlphaCutoff == getDefaultAlphaCutoff()) { // HACK -- nudge by epsilon if we receive a default value (indicates override to default) @@ -854,7 +854,7 @@ void LLGLTFMaterial::applyOverrideLLSD(const LLSD& data) const LLSD& r = ti[i]["r"]; if (r.isReal()) { - mTextureTransform[i].mRotation = r.asReal(); + mTextureTransform[i].mRotation = (F32)r.asReal(); } } } diff --git a/indra/llprimitive/llmaterialid.cpp b/indra/llprimitive/llmaterialid.cpp index 847824d770..4992b282f3 100644 --- a/indra/llprimitive/llmaterialid.cpp +++ b/indra/llprimitive/llmaterialid.cpp @@ -136,7 +136,7 @@ LLSD LLMaterialID::asLLSD() const materialIDBinary.resize(MATERIAL_ID_SIZE * sizeof(U8)); memcpy(materialIDBinary.data(), mID, MATERIAL_ID_SIZE * sizeof(U8)); - LLSD materialID = materialIDBinary; + LLSD materialID = std::move(materialIDBinary); return materialID; } diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index e7152a2291..15087a7255 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -1487,7 +1487,7 @@ void LLMeshSkinInfo::fromLLSD(LLSD& skin) { for (U32 k = 0; k < 4; k++) { - mat.mMatrix[j][k] = skin["inverse_bind_matrix"][i][j*4+k].asReal(); + mat.mMatrix[j][k] = (F32)skin["inverse_bind_matrix"][i][j*4+k].asReal(); } } @@ -1510,7 +1510,7 @@ void LLMeshSkinInfo::fromLLSD(LLSD& skin) { for (U32 k = 0; k < 4; k++) { - mat.mMatrix[j][k] = skin["bind_shape_matrix"][j*4+k].asReal(); + mat.mMatrix[j][k] = (F32)skin["bind_shape_matrix"][j*4+k].asReal(); } } mBindShapeMatrix.loadu(mat); @@ -1525,7 +1525,7 @@ void LLMeshSkinInfo::fromLLSD(LLSD& skin) { for (U32 k = 0; k < 4; k++) { - mat.mMatrix[j][k] = skin["alt_inverse_bind_matrix"][i][j*4+k].asReal(); + mat.mMatrix[j][k] = (F32)skin["alt_inverse_bind_matrix"][i][j*4+k].asReal(); } } @@ -1535,7 +1535,7 @@ void LLMeshSkinInfo::fromLLSD(LLSD& skin) if (skin.has("pelvis_offset")) { - mPelvisOffset = skin["pelvis_offset"].asReal(); + mPelvisOffset = (F32)skin["pelvis_offset"].asReal(); } if (skin.has("lock_scale_if_joint_position")) @@ -1618,7 +1618,7 @@ void LLMeshSkinInfo::updateHash() for (size_t i = 0, count = mInvBindMatrix.size() * 16; i < count; ++i) { - S32 t = llround(src[i] * 10000.f); + S32 t = ll_round(src[i] * 10000.f); hash.update((const void*)&t, sizeof(S32)); } //hash.update((const void*)mInvBindMatrix.data(), sizeof(LLMatrix4a) * mInvBindMatrix.size()); diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index 644476460c..c5d6076b98 100644 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -1126,8 +1126,6 @@ namespace { const size_t size(sizeof(T)); - LL_DEBUGS("TEXTUREENTRY") << "Request to read items of size " << size << " with swizzle " << type << " froum buffer sized " << (source_end - source) << LL_ENDL; - if ((source + size + 1) > source_end) { // we add 1 above to take into account the byte that we know must follow the value. diff --git a/indra/llprimitive/lltreeparams.cpp b/indra/llprimitive/lltreeparams.cpp index b85aa3acf2..b6216c022b 100644 --- a/indra/llprimitive/lltreeparams.cpp +++ b/indra/llprimitive/lltreeparams.cpp @@ -178,7 +178,7 @@ F32 LLTreeParams::ShapeRatio(EShapeRatio shape, F32 ratio) case (SR_SPHERICAL): return (.2f + .8f * sinf(F_PI*ratio)); case (SR_HEMISPHERICAL): - return (.2f + .8f * sinf(.5*F_PI*ratio)); + return (.2f + .8f * sinf(.5f*F_PI*ratio)); case (SR_CYLINDRICAL): return (1); case (SR_TAPERED_CYLINDRICAL): diff --git a/indra/llprimitive/tests/llmediaentry_test.cpp b/indra/llprimitive/tests/llmediaentry_test.cpp index e8f40d1ffd..414df66680 100644 --- a/indra/llprimitive/tests/llmediaentry_test.cpp +++ b/indra/llprimitive/tests/llmediaentry_test.cpp @@ -26,14 +26,9 @@ #include "linden_common.h" #include "lltut.h" -#if LL_WINDOWS -#pragma warning (push) -#pragma warning (disable : 4702) // boost::lexical_cast generates this warning -#endif + #include <boost/lexical_cast.hpp> -#if LL_WINDOWS -#pragma warning (pop) -#endif + #include "llstring.h" #include "llsdutil.h" #include "llsdserialize.h" |