diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llinventorymodel.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llviewerinventory.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llviewerinventory.h | 4 |
3 files changed, 10 insertions, 8 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index 0b2615c706..c7cc8f3032 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -3500,7 +3500,9 @@ bool LLInventoryModel::saveToFile(const std::string& filename, { if (cat->getVersion() != LLViewerInventoryCategory::VERSION_UNKNOWN) { - fileXML << LLSDOStreamer<LLSDNotationFormatter>(cat->exportLLSD()) << std::endl; + LLSD sd = LLSD::emptyMap(); + cat->exportLLSD(sd); + fileXML << LLSDOStreamer<LLSDNotationFormatter>(sd) << std::endl; cat_count++; } @@ -3514,7 +3516,9 @@ bool LLInventoryModel::saveToFile(const std::string& filename, auto it_count = items.size(); for (auto& item : items) { - fileXML << LLSDOStreamer<LLSDNotationFormatter>(item->asLLSD()) << std::endl; + LLSD sd = LLSD::emptyMap(); + item->asLLSD(sd); + fileXML << LLSDOStreamer<LLSDNotationFormatter>(sd) << std::endl; if (fileXML.fail()) { diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 36ec6f0d78..8caa0144c3 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -751,13 +751,11 @@ S32 LLViewerInventoryCategory::getViewerDescendentCount() const return descendents_actual; } -LLSD LLViewerInventoryCategory::exportLLSD() const +void LLViewerInventoryCategory::exportLLSD(LLSD & cat_data) const { - LLSD cat_data = LLInventoryCategory::exportLLSD(); + LLInventoryCategory::exportLLSD(cat_data); cat_data[INV_OWNER_ID] = mOwnerID; cat_data[INV_VERSION] = mVersion; - - return cat_data; } bool LLViewerInventoryCategory::importLLSD(const LLSD& cat_data) diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h index 18daa368d9..5cd31353f8 100644 --- a/indra/newview/llviewerinventory.h +++ b/indra/newview/llviewerinventory.h @@ -232,8 +232,8 @@ public: // How many descendents do we currently have information for in the InventoryModel? S32 getViewerDescendentCount() const; - LLSD exportLLSD() const; - bool importLLSD(const LLSD& cat_data); + virtual void exportLLSD(LLSD &sd) const; + virtual bool importLLSD(const LLSD& cat_data); void determineFolderType(); void changeType(LLFolderType::EType new_folder_type); |