summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/lltexturectrl.cpp12
-rw-r--r--indra/newview/lltexturectrl.h28
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),