diff options
author | Merov Linden <merov@lindenlab.com> | 2012-03-01 21:57:16 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2012-03-01 21:57:16 -0800 |
commit | 44c66e11ccee4f8370dc9cf2a87c44e323c9c68d (patch) | |
tree | 40ef3f9c92fb8be9c82ea83ebd1729bc7b974246 /indra/llui/llclipboard.cpp | |
parent | f0a1b43f2270cb8424409babf5ae88233cdd8f6c (diff) |
EXP-1841 : Use std::vector instead of LLDynamicArray in LLClipboard.
Diffstat (limited to 'indra/llui/llclipboard.cpp')
-rw-r--r-- | indra/llui/llclipboard.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/indra/llui/llclipboard.cpp b/indra/llui/llclipboard.cpp index e0729366cc..037b9cb254 100644 --- a/indra/llui/llclipboard.cpp +++ b/indra/llui/llclipboard.cpp @@ -55,7 +55,7 @@ void LLClipboard::reset() mCleanupCallback(); } // Clear the clipboard - mObjects.reset(); + mObjects.clear(); mCutMode = false; mCleanupCallback = NULL; mString = LLWString(); @@ -83,24 +83,24 @@ bool LLClipboard::addToClipboard(const LLUUID& src, const LLAssetType::EType typ } if (res) { - mObjects.put(src); + mObjects.push_back(src); mState++; } } return res; } -bool LLClipboard::pasteFromClipboard(LLDynamicArray<LLUUID>& inv_objects) const +bool LLClipboard::pasteFromClipboard(std::vector<LLUUID>& inv_objects) const { bool res = false; - S32 count = mObjects.count(); + S32 count = mObjects.size(); if (count > 0) { res = true; - inv_objects.reset(); + inv_objects.clear(); for (S32 i = 0; i < count; i++) { - inv_objects.put(mObjects[i]); + inv_objects.push_back(mObjects[i]); } } return res; @@ -109,13 +109,14 @@ bool LLClipboard::pasteFromClipboard(LLDynamicArray<LLUUID>& inv_objects) const // Returns true if the LL Clipboard has pasteable items in it bool LLClipboard::hasContents() const { - return (mObjects.count() > 0); + return (mObjects.size() > 0); } // Returns true if the input uuid is in the list of clipboard objects bool LLClipboard::isOnClipboard(const LLUUID& object) const { - return (mObjects.find(object) != LLDynamicArray<LLUUID>::FAIL); + std::vector<LLUUID>::const_iterator iter = std::find(mObjects.begin(), mObjects.end(), object); + return (iter != mObjects.end()); } // Copy the input string to the LL and the system clipboard |