diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-01-22 20:43:53 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-01-22 20:43:53 +0200 |
commit | 210d9204813318f55fb39505fda88d4a3544ae0e (patch) | |
tree | d9870ad79104af44b031b1c65cb1d39d677283e9 /indra | |
parent | 0625516e3838b940d3ed4be1167b7def147f5d22 (diff) |
Build fix for issues/22
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/lltexturectrl.cpp | 12 | ||||
-rw-r--r-- | indra/newview/lltexturectrl.h | 28 |
2 files changed, 14 insertions, 26 deletions
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<LLTextureCtrl::EPickInventoryType>::declareValues() - { - declare("texture_material", LLTextureCtrl::PICK_TEXTURE_MATERIAL); - declare("texture", LLTextureCtrl::PICK_TEXTURE); - declare("material", LLTextureCtrl::PICK_MATERIAL); - } + void TypeValues<EPickInventoryType>::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<LLTexPickInventoryType> : public TypeValuesHelper<LLTexPickInventoryType> + struct TypeValues<EPickInventoryType> : public TypeValuesHelper<EPickInventoryType> { 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<LLTexPickInventoryType> 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<Params, LLUICtrl::Params> { @@ -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), |