summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llassettype.cpp14
-rw-r--r--indra/llcommon/llassettype.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/indra/llcommon/llassettype.cpp b/indra/llcommon/llassettype.cpp
index 628ebb7aec..b5378943ca 100644
--- a/indra/llcommon/llassettype.cpp
+++ b/indra/llcommon/llassettype.cpp
@@ -184,6 +184,20 @@ const char* LLAssetType::lookupHumanReadable(LLAssetType::EType type)
}
}
+// static
+LLAssetType::EType LLAssetType::lookupHumanReadable( const char* name )
+{
+ for( S32 i = 0; i < AT_COUNT; i++ )
+ {
+ if( 0 == strcmp(name, mAssetTypeHumanNames[i]) )
+ {
+ // match
+ return (EType)i;
+ }
+ }
+ return AT_NONE;
+}
+
EDragAndDropType LLAssetType::lookupDragAndDropType( EType asset )
{
switch( asset )
diff --git a/indra/llcommon/llassettype.h b/indra/llcommon/llassettype.h
index abc118fe9c..aedee06483 100644
--- a/indra/llcommon/llassettype.h
+++ b/indra/llcommon/llassettype.h
@@ -126,6 +126,7 @@ public:
static const char* lookup(EType type);
// translation from a type to a human readable form.
+ static EType lookupHumanReadable( const char* name );
static const char* lookupHumanReadable(EType type);
static EDragAndDropType lookupDragAndDropType( EType );