summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llinventory')
-rw-r--r--indra/llinventory/llinventory.cpp18
-rw-r--r--indra/llinventory/llinventory.h14
-rw-r--r--indra/llinventory/llnotecard.cpp26
3 files changed, 29 insertions, 29 deletions
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index 55bcc7c5b2..ca2d571c5d 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -132,7 +132,7 @@ LLAssetType::EType LLInventoryObject::getActualType() const
return mType;
}
-BOOL LLInventoryObject::getIsLinkType() const
+bool LLInventoryObject::getIsLinkType() const
{
return LLAssetType::lookupIsLinkType(mType);
}
@@ -181,7 +181,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.
@@ -252,10 +252,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";
@@ -266,7 +266,7 @@ 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
@@ -612,7 +612,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.
@@ -790,7 +790,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";
@@ -1248,7 +1248,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.
@@ -1330,7 +1330,7 @@ BOOL LLInventoryCategory::importLegacyStream(std::istream& input_stream)
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";
diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h
index 6d4535af27..099080060c 100644
--- a/indra/llinventory/llinventory.h
+++ b/indra/llinventory/llinventory.h
@@ -74,7 +74,7 @@ public:
virtual const std::string& getName() const;
virtual LLAssetType::EType getType() const;
LLAssetType::EType getActualType() const; // bypasses indirection for linked items
- BOOL getIsLinkType() const;
+ bool getIsLinkType() const;
virtual time_t getCreationDate() const;
//--------------------------------------------------------------------
@@ -98,8 +98,8 @@ public:
// between simulator and viewer.
//--------------------------------------------------------------------
- virtual BOOL importLegacyStream(std::istream& input_stream);
- virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const;
+ virtual bool importLegacyStream(std::istream& input_stream);
+ virtual bool exportLegacyStream(std::ostream& output_stream, bool include_asset_key = true) const;
virtual void updateParentOnServer(BOOL) const;
virtual void updateServer(BOOL) const;
@@ -199,8 +199,8 @@ public:
// File Support
//--------------------------------------------------------------------
public:
- virtual BOOL importLegacyStream(std::istream& input_stream);
- virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const;
+ virtual bool importLegacyStream(std::istream& input_stream);
+ virtual bool exportLegacyStream(std::ostream& output_stream, bool include_asset_key = true) const;
//--------------------------------------------------------------------
// Helper Functions
@@ -267,8 +267,8 @@ public:
// File Support
//--------------------------------------------------------------------
public:
- virtual BOOL importLegacyStream(std::istream& input_stream);
- virtual BOOL exportLegacyStream(std::ostream& output_stream, BOOL include_asset_key = TRUE) const;
+ virtual bool importLegacyStream(std::istream& input_stream);
+ virtual bool exportLegacyStream(std::ostream& output_stream, bool include_asset_key = TRUE) const;
LLSD exportLLSD() const;
bool importLLSD(const LLSD& cat_data);
diff --git a/indra/llinventory/llnotecard.cpp b/indra/llinventory/llnotecard.cpp
index 908c647498..4ac5657e10 100644
--- a/indra/llinventory/llnotecard.cpp
+++ b/indra/llinventory/llnotecard.cpp
@@ -162,25 +162,25 @@ bool LLNotecard::importStream(std::istream& str)
if(str.fail())
{
LL_WARNS() << "Invalid Linden text file header " << LL_ENDL;
- return FALSE;
+ return false;
}
if( 1 != mVersion && 2 != mVersion)
{
LL_WARNS() << "Invalid Linden text file version: " << mVersion << LL_ENDL;
- return FALSE;
+ return false;
}
str >> std::ws >> "{\n";
if(str.fail())
{
LL_WARNS() << "Invalid Linden text file format" << LL_ENDL;
- return FALSE;
+ return false;
}
if(!importEmbeddedItemsStream(str))
{
- return FALSE;
+ return false;
}
char line_buf[STD_STRING_BUF_SIZE]; /* Flawfinder: ignore */
@@ -188,7 +188,7 @@ bool LLNotecard::importStream(std::istream& str)
if(str.fail())
{
LL_WARNS() << "Invalid Linden text length field" << LL_ENDL;
- return FALSE;
+ return false;
}
line_buf[STD_STRING_STR_LEN] = '\0';
@@ -196,23 +196,23 @@ bool LLNotecard::importStream(std::istream& str)
if( 1 != sscanf(line_buf, "Text length %d", &text_len) )
{
LL_WARNS() << "Invalid Linden text length field" << LL_ENDL;
- return FALSE;
+ return false;
}
if(text_len > mMaxText || text_len < 0)
{
LL_WARNS() << "Invalid Linden text length: " << text_len << LL_ENDL;
- return FALSE;
+ return false;
}
- BOOL success = TRUE;
+ bool success = true;
char* text = new char[text_len + 1];
fullread(str, text, text_len);
if(str.fail())
{
LL_WARNS() << "Invalid Linden text: text shorter than text length: " << text_len << LL_ENDL;
- success = FALSE;
+ success = false;
}
text[text_len] = '\0';
@@ -247,7 +247,7 @@ bool LLNotecard::exportEmbeddedItemsStream( std::ostream& out_stream )
out_stream << llformat("ext char index %d\n", idx );
if( !item->exportLegacyStream( out_stream ) )
{
- return FALSE;
+ return false;
}
out_stream << "}\n";
}
@@ -256,7 +256,7 @@ bool LLNotecard::exportEmbeddedItemsStream( std::ostream& out_stream )
out_stream << "}\n";
- return TRUE;
+ return true;
}
bool LLNotecard::exportStream( std::ostream& out_stream )
@@ -266,14 +266,14 @@ bool LLNotecard::exportStream( std::ostream& out_stream )
if( !exportEmbeddedItemsStream( out_stream ) )
{
- return FALSE;
+ return false;
}
out_stream << llformat("Text length %d\n", mText.length() );
out_stream << mText;
out_stream << "}\n";
- return TRUE;
+ return true;
}
////////////////////////////////////////////////////////////////////////////