summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorDon Kjer <don@lindenlab.com>2007-03-15 00:54:39 +0000
committerDon Kjer <don@lindenlab.com>2007-03-15 00:54:39 +0000
commit0947e139ed57685d24667a362ad0e13b7df13509 (patch)
treed6a9c7c5f865b247c66fcc20b6df22092d8ffc15 /indra/llcommon
parent00dbacb215da8d6b6739b4bcefebee552de89a9c (diff)
svn merge -r 58433:58660 svn+ssh://svn/svn/linden/branches/upload-queue into release
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 );