diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2009-09-12 09:11:32 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2009-09-12 09:11:32 -0400 |
commit | 689af4b32948e2d2a07b60adcc318668c4d55585 (patch) | |
tree | 86fb5dd1cb0b280e86dae39e5dcb4f289a5025b8 /indra | |
parent | d40d745cba1de0df4ada7d4d2cf9f1632279ae12 (diff) |
DEV-38598: remove dangerous compare-LLSD-less-than operation
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llfloater.cpp | 11 | ||||
-rw-r--r-- | indra/llui/llfloater.h | 4 |
2 files changed, 14 insertions, 1 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 786340b468..a372bac497 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -146,6 +146,16 @@ LLFloater::handle_map_t LLFloater::sFloaterMap; LLFloaterView* gFloaterView = NULL; +/*==========================================================================*| +// DEV-38598: The fundamental problem with this operation is that it can only +// support a subset of LLSD values. While it's plausible to compare two arrays +// lexicographically, what strict ordering can you impose on maps? +// (LLFloaterTOS's current key is an LLSD map.) + +// Of course something like this is necessary if you want to build a std::set +// or std::map with LLSD keys. Fortunately we're getting by with other +// container types for now. + //static bool LLFloater::KeyCompare::compare(const LLSD& a, const LLSD& b) { @@ -173,6 +183,7 @@ bool LLFloater::KeyCompare::compare(const LLSD& a, const LLSD& b) else return false; // no valid operation for Binary } +|*==========================================================================*/ bool LLFloater::KeyCompare::equate(const LLSD& a, const LLSD& b) { diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index ee066317e0..cace13939f 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -87,12 +87,14 @@ friend class LLMultiFloater; public: struct KeyCompare { - static bool compare(const LLSD& a, const LLSD& b); +// static bool compare(const LLSD& a, const LLSD& b); static bool equate(const LLSD& a, const LLSD& b); +/*==========================================================================*| bool operator()(const LLSD& a, const LLSD& b) const { return compare(a, b); } +|*==========================================================================*/ }; enum EFloaterButtons |