diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2025-02-06 18:03:21 +0200 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2025-02-07 18:34:04 +0200 |
commit | 046ec79d2288cbe9e65999ea9e693652036c1813 (patch) | |
tree | 7df709dbb819b03beb58f1d82bcc1a8451dd8731 /indra/newview/llinventoryfunctions.cpp | |
parent | df0634f0c4980fa663f9635c931fd4ba44f864ea (diff) |
#3505 Make inventory run less content checks
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r-- | indra/newview/llinventoryfunctions.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index dadd0590a9..1ccefa3212 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2634,6 +2634,22 @@ bool LLIsType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) return false; } +bool LLIsOneOfTypes::operator()(LLInventoryCategory* cat, LLInventoryItem* item) +{ + for (LLAssetType::EType &type : mTypes) + { + if (type == LLAssetType::AT_CATEGORY) + { + if (cat) return true; + } + if (item) + { + if (item->getType() == type) return true; + } + } + return false; +} + bool LLIsNotType::operator()(LLInventoryCategory* cat, LLInventoryItem* item) { if(mType == LLAssetType::AT_CATEGORY) |