summaryrefslogtreecommitdiff
path: root/indra/llinventory/llinventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llinventory/llinventory.cpp')
-rw-r--r--indra/llinventory/llinventory.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index 16a308ed72..5bf8020a68 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -143,7 +143,7 @@ LLAssetType::EType LLInventoryObject::getActualType() const
return mType;
}
-BOOL LLInventoryObject::getIsLinkType() const
+bool LLInventoryObject::getIsLinkType() const
{
return LLAssetType::lookupIsLinkType(mType);
}
@@ -197,7 +197,7 @@ void LLInventoryObject::setType(LLAssetType::EType type)
// virtual
-BOOL LLInventoryObject::importLegacyStream(std::istream& input_stream)
+bool LLInventoryObject::importLegacyStream(std::istream& input_stream)
{
// *NOTE: Changing the buffer size will require changing the scanf
// calls below.
@@ -297,10 +297,10 @@ BOOL LLInventoryObject::importLegacyStream(std::istream& input_stream)
<< "' in LLInventoryObject::importLegacyStream() for object " << mUUID << LL_ENDL;
}
}
- return TRUE;
+ return true;
}
-BOOL LLInventoryObject::exportLegacyStream(std::ostream& output_stream, BOOL) const
+bool LLInventoryObject::exportLegacyStream(std::ostream& output_stream, bool) const
{
std::string uuid_str;
output_stream << "\tinv_object\t0\n\t{\n";
@@ -311,16 +311,16 @@ BOOL LLInventoryObject::exportLegacyStream(std::ostream& output_stream, BOOL) co
output_stream << "\t\ttype\t" << LLAssetType::lookup(mType) << "\n";
output_stream << "\t\tname\t" << mName.c_str() << "|\n";
output_stream << "\t}\n";
- return TRUE;
+ return true;
}
-void LLInventoryObject::updateParentOnServer(BOOL) const
+void LLInventoryObject::updateParentOnServer(bool) const
{
// don't do nothin'
LL_WARNS() << "LLInventoryObject::updateParentOnServer() called. Doesn't do anything." << LL_ENDL;
}
-void LLInventoryObject::updateServer(BOOL) const
+void LLInventoryObject::updateServer(bool) const
{
// don't do nothin'
LL_WARNS() << "LLInventoryObject::updateServer() called. Doesn't do anything." << LL_ENDL;
@@ -607,7 +607,7 @@ void LLInventoryItem::packMessage(LLMessageSystem* msg) const
}
// virtual
-BOOL LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num)
+bool LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32 block_num)
{
msg->getUUIDFast(block, _PREHASH_ItemID, mUUID, block_num);
msg->getUUIDFast(block, _PREHASH_FolderID, mParentUUID, block_num);
@@ -643,13 +643,13 @@ BOOL LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32
if(local_crc == remote_crc)
{
LL_DEBUGS() << "crc matches" << LL_ENDL;
- return TRUE;
+ return true;
}
else
{
LL_WARNS() << "inventory crc mismatch: local=" << std::hex << local_crc
<< " remote=" << remote_crc << std::dec << LL_ENDL;
- return FALSE;
+ return false;
}
#else
return (local_crc == remote_crc);
@@ -657,7 +657,7 @@ BOOL LLInventoryItem::unpackMessage(LLMessageSystem* msg, const char* block, S32
}
// virtual
-BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
+bool LLInventoryItem::importLegacyStream(std::istream& input_stream)
{
// *NOTE: Changing the buffer size will require changing the scanf
// calls below.
@@ -665,7 +665,7 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
char keyword[MAX_STRING]; /* Flawfinder: ignore */
char valuestr[MAX_STRING]; /* Flawfinder: ignore */
char junk[MAX_STRING]; /* Flawfinder: ignore */
- BOOL success = TRUE;
+ bool success = true;
keyword[0] = '\0';
valuestr[0] = '\0';
@@ -705,7 +705,7 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
// the permissions. Thus, we read that out, and fix legacy
// objects. It's possible this op would fail, but it
// should pick up the vast majority of the tasks.
- BOOL has_perm_mask = FALSE;
+ bool has_perm_mask = false;
U32 perm_mask = 0;
success = mSaleInfo.importLegacyStream(input_stream, has_perm_mask, perm_mask);
if(has_perm_mask)
@@ -864,7 +864,7 @@ BOOL LLInventoryItem::importLegacyStream(std::istream& input_stream)
return success;
}
-BOOL LLInventoryItem::exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key) const
+bool LLInventoryItem::exportLegacyStream(std::ostream& output_stream, bool include_asset_key) const
{
std::string uuid_str;
output_stream << "\tinv_item\t0\n\t{\n";
@@ -923,7 +923,7 @@ BOOL LLInventoryItem::exportLegacyStream(std::ostream& output_stream, BOOL inclu
output_stream << "\t\tdesc\t" << mDescription.c_str() << "|\n";
output_stream << "\t\tcreation_date\t" << mCreationDate << "\n";
output_stream << "\t}\n";
- return TRUE;
+ return true;
}
LLSD LLInventoryItem::asLLSD() const
@@ -972,7 +972,7 @@ void LLInventoryItem::asLLSD( LLSD& sd ) const
}
//sd[INV_FLAGS_LABEL] = (S32)mFlags;
sd[INV_FLAGS_LABEL] = ll_sd_from_U32(mFlags);
- sd[INV_SALE_INFO_LABEL] = mSaleInfo;
+ sd[INV_SALE_INFO_LABEL] = mSaleInfo.asLLSD();
sd[INV_NAME_LABEL] = mName;
sd[INV_DESC_LABEL] = mDescription;
sd[INV_CREATION_DATE_LABEL] = (S32) mCreationDate;
@@ -1029,7 +1029,7 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new)
<integer> 1 </key>
*/
continue;
- }
+ }
if (i->first == INV_THUMBNAIL_ID_LABEL)
{
@@ -1060,7 +1060,7 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new)
// the permissions. Thus, we read that out, and fix legacy
// objects. It's possible this op would fail, but it
// should pick up the vast majority of the tasks.
- BOOL has_perm_mask = FALSE;
+ bool has_perm_mask = false;
U32 perm_mask = 0;
if (!mSaleInfo.fromLLSD(i->second, has_perm_mask, perm_mask))
{
@@ -1366,7 +1366,7 @@ void LLInventoryCategory::unpackMessage(LLMessageSystem* msg,
}
// virtual
-BOOL LLInventoryCategory::importLegacyStream(std::istream& input_stream)
+bool LLInventoryCategory::importLegacyStream(std::istream& input_stream)
{
// *NOTE: Changing the buffer size will require changing the scanf
// calls below.
@@ -1474,10 +1474,10 @@ BOOL LLInventoryCategory::importLegacyStream(std::istream& input_stream)
<< "' in inventory import category " << mUUID << LL_ENDL;
}
}
- return TRUE;
+ return true;
}
-BOOL LLInventoryCategory::exportLegacyStream(std::ostream& output_stream, BOOL) const
+bool LLInventoryCategory::exportLegacyStream(std::ostream& output_stream, bool) const
{
std::string uuid_str;
output_stream << "\tinv_category\t0\n\t{\n";
@@ -1498,7 +1498,7 @@ BOOL LLInventoryCategory::exportLegacyStream(std::ostream& output_stream, BOOL)
output_stream << "|\n";
}
output_stream << "\t}\n";
- return TRUE;
+ return true;
}
LLSD LLInventoryCategory::exportLLSD() const