summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Linden <brad@lindenlab.com>2023-02-02 12:25:03 -0800
committerBrad Linden <brad@lindenlab.com>2023-02-02 12:26:59 -0800
commitdc1dd7a274e1ce49eb68ca525eba7f2e39032fa8 (patch)
tree535a038061929e5f737ddaf396fc8a8b08ed1dc3
parent5fabfa50d7135d29c0cb8a553006cf9038f9baae (diff)
Fix some unused variable warnings in DRTVWR-559
-rw-r--r--indra/llprimitive/llgltfloader.cpp5
-rw-r--r--indra/newview/llmaterialeditor.cpp4
2 files changed, 5 insertions, 4 deletions
diff --git a/indra/llprimitive/llgltfloader.cpp b/indra/llprimitive/llgltfloader.cpp
index 6041c9c273..fd304f7bc9 100644
--- a/indra/llprimitive/llgltfloader.cpp
+++ b/indra/llprimitive/llgltfloader.cpp
@@ -167,7 +167,7 @@ bool LLGLTFLoader::parseMeshes()
bool LLGLTFLoader::populateModelFromMesh(LLModel* pModel, const tinygltf::Mesh &mesh)
{
pModel->mLabel = mesh.name;
- int pos_idx, norm_idx, tan_idx, uv0_idx, uv1_idx, color0_idx, color1_idx;
+ int pos_idx;
tinygltf::Accessor indices_a, positions_a, normals_a, uv0_a, color0_a;
auto prims = mesh.primitives;
@@ -187,12 +187,15 @@ bool LLGLTFLoader::populateModelFromMesh(LLModel* pModel, const tinygltf::Mesh &
//if (positions_buf.name
}
+#if 0
+ int norm_idx, tan_idx, uv0_idx, uv1_idx, color0_idx, color1_idx;
norm_idx = (prim.attributes.count("NORMAL") > 0) ? prim.attributes.at("NORMAL") : -1;
tan_idx = (prim.attributes.count("TANGENT") > 0) ? prim.attributes.at("TANGENT") : -1;
uv0_idx = (prim.attributes.count("TEXCOORDS_0") > 0) ? prim.attributes.at("TEXCOORDS_0") : -1;
uv1_idx = (prim.attributes.count("TEXCOORDS_1") > 0) ? prim.attributes.at("TEXCOORDS_1") : -1;
color0_idx = (prim.attributes.count("COLOR_0") > 0) ? prim.attributes.at("COLOR_0") : -1;
color1_idx = (prim.attributes.count("COLOR_1") > 0) ? prim.attributes.at("COLOR_1") : -1;
+#endif
if (prim.mode == TINYGLTF_MODE_TRIANGLES)
{
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 5628327ebe..14ebfa451a 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -770,7 +770,7 @@ void LLMaterialEditor::markChangesUnsaved(U32 dirty_flag)
const LLInventoryItem* item = getItem();
if (item)
{
- LLPermissions perm(item->getPermissions());
+ //LLPermissions perm(item->getPermissions());
bool allow_modify = canModify(mObjectUUID, item);
bool source_library = mObjectUUID.isNull() && gInventory.isObjectDescendentOf(mItemUUID, gInventory.getLibraryRootFolderID());
bool source_notecard = mNotecardInventoryID.notNull();
@@ -1339,7 +1339,6 @@ bool LLMaterialEditor::updateInventoryItem(const std::string &buffer, const LLUU
}
else if (!task_id.isNull() && !task_url.empty())
{
- LLUUID object_uuid(task_id);
uploadInfo = std::make_shared<LLBufferedAssetUploadInfo>(task_id, item_id, LLAssetType::AT_MATERIAL, buffer,
[](LLUUID itemId, LLUUID task_id, LLUUID newAssetId, LLSD)
{
@@ -1390,7 +1389,6 @@ void LLMaterialEditor::createInventoryItem(const std::string &buffer, const std:
// gen a new uuid for this asset
LLTransactionID tid;
tid.generate(); // timestamp-based randomization + uniquification
- LLAssetID new_asset_id = tid.makeAssetID(gAgent.getSecureSessionID());
U32 next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Materials");
LLUUID parent = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_MATERIAL);
const U8 subtype = NO_INV_SUBTYPE; // TODO maybe use AT_SETTINGS and LLSettingsType::ST_MATERIAL ?