From 210d9204813318f55fb39505fda88d4a3544ae0e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 22 Jan 2024 20:43:53 +0200 Subject: Build fix for issues/22 --- indra/newview/lltexturectrl.cpp | 12 ++++++------ indra/newview/lltexturectrl.h | 28 ++++++++-------------------- 2 files changed, 14 insertions(+), 26 deletions(-) (limited to 'indra') diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index c330696fb2..368222f7a0 100644 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -2367,12 +2367,12 @@ LLSD LLTextureCtrl::getValue() const namespace LLInitParam { - void TypeValues::declareValues() - { - declare("texture_material", LLTextureCtrl::PICK_TEXTURE_MATERIAL); - declare("texture", LLTextureCtrl::PICK_TEXTURE); - declare("material", LLTextureCtrl::PICK_MATERIAL); - } + void TypeValues::declareValues() + { + declare("texture_material", PICK_TEXTURE_MATERIAL); + declare("texture", PICK_TEXTURE); + declare("material", PICK_MATERIAL); + } } diff --git a/indra/newview/lltexturectrl.h b/indra/newview/lltexturectrl.h index d71566c526..5c7091a9b5 100644 --- a/indra/newview/lltexturectrl.h +++ b/indra/newview/lltexturectrl.h @@ -64,17 +64,18 @@ bool get_is_predefined_texture(LLUUID asset_id); LLUUID get_copy_free_item_by_asset_id(LLUUID image_id, bool no_trans_perm = false); bool get_can_copy_texture(LLUUID image_id); -enum class LLTexPickInventoryType : U32 + +typedef enum e_pick_inventory_type { - TEXTURE_MATERIAL = 0, - TEXTURE = 1, - MATERIAL = 2, -}; + PICK_TEXTURE_MATERIAL = 0, + PICK_TEXTURE = 1, + PICK_MATERIAL = 2, +} EPickInventoryType; namespace LLInitParam { template<> - struct TypeValues : public TypeValuesHelper + struct TypeValues : public TypeValuesHelper { static void declareValues(); }; @@ -88,13 +89,6 @@ enum LLPickerSource PICKER_UNKNOWN, // on cancel, default ids }; -typedef enum e_pick_inventory_type -{ - PICK_TEXTURE_MATERIAL = 0, - PICK_TEXTURE = 1, - PICK_MATERIAL = 2, -} EPickInventoryType; - ////////////////////////////////////////////////////////////////////////////////////////// // LLTextureCtrl @@ -110,12 +104,6 @@ public: TEXTURE_CANCEL } ETexturePickOp; - // *HACK: Can't forward-declare an enum scoped inside a class. Maybe there's a better way to initialize LLInitParam::TypeValues that doesn't run into this limitation. - typedef LLTexPickInventoryType EPickInventoryType; - static const EPickInventoryType PICK_TEXTURE_MATERIAL = LLTexPickInventoryType::TEXTURE_MATERIAL; - static const EPickInventoryType PICK_TEXTURE = LLTexPickInventoryType::TEXTURE; - static const EPickInventoryType PICK_MATERIAL = LLTexPickInventoryType::MATERIAL; - public: struct Params : public LLInitParam::Block { @@ -140,7 +128,7 @@ public: : image_id("image"), default_image_id("default_image_id"), default_image_name("default_image_name"), - pick_type("pick_type", LLTexPickInventoryType::TEXTURE), + pick_type("pick_type", PICK_TEXTURE), allow_no_texture("allow_no_texture", false), can_apply_immediately("can_apply_immediately"), no_commit_on_selection("no_commit_on_selection", false), -- cgit v1.2.3