summaryrefslogtreecommitdiff
path: root/indra/llmessage/message.cpp
diff options
context:
space:
mode:
authorMark Palange <palange@lindenlab.com>2008-11-07 17:51:03 +0000
committerMark Palange <palange@lindenlab.com>2008-11-07 17:51:03 +0000
commitf89f19990cbb9f3f2e7473ac6c159098bdfabec7 (patch)
treee7fa406e2db5e9adc2e24e00557d7b3d3f93203a /indra/llmessage/message.cpp
parentb2bfb128e7d30e1cdb293a2ac192a0cbe63fe528 (diff)
QAR-992 Merging revisions 101012-101170,101686-101687 of svn+ssh://svn.lindenlab.com/svn/linden/qa/viewer_combo_1-22-merge into linden/release
Diffstat (limited to 'indra/llmessage/message.cpp')
-rw-r--r--indra/llmessage/message.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/indra/llmessage/message.cpp b/indra/llmessage/message.cpp
index dd7818c470..0e2a5cbf7f 100644
--- a/indra/llmessage/message.cpp
+++ b/indra/llmessage/message.cpp
@@ -3956,22 +3956,27 @@ void LLMessageSystem::getString(const char *block, const char *var,
blocknum);
}
-S32 LLMessageSystem::getNumberOfBlocksFast(const char *blockname)
+BOOL LLMessageSystem::has(const char *blockname) const
+{
+ return getNumberOfBlocks(blockname) > 0;
+}
+
+S32 LLMessageSystem::getNumberOfBlocksFast(const char *blockname) const
{
return mMessageReader->getNumberOfBlocks(blockname);
}
-S32 LLMessageSystem::getNumberOfBlocks(const char *blockname)
+S32 LLMessageSystem::getNumberOfBlocks(const char *blockname) const
{
return getNumberOfBlocksFast(LLMessageStringTable::getInstance()->getString(blockname));
}
-S32 LLMessageSystem::getSizeFast(const char *blockname, const char *varname)
+S32 LLMessageSystem::getSizeFast(const char *blockname, const char *varname) const
{
return mMessageReader->getSize(blockname, varname);
}
-S32 LLMessageSystem::getSize(const char *blockname, const char *varname)
+S32 LLMessageSystem::getSize(const char *blockname, const char *varname) const
{
return getSizeFast(LLMessageStringTable::getInstance()->getString(blockname),
LLMessageStringTable::getInstance()->getString(varname));
@@ -3979,13 +3984,13 @@ S32 LLMessageSystem::getSize(const char *blockname, const char *varname)
// size in bytes of variable length data
S32 LLMessageSystem::getSizeFast(const char *blockname, S32 blocknum,
- const char *varname)
+ const char *varname) const
{
return mMessageReader->getSize(blockname, blocknum, varname);
}
S32 LLMessageSystem::getSize(const char *blockname, S32 blocknum,
- const char *varname)
+ const char *varname) const
{
return getSizeFast(LLMessageStringTable::getInstance()->getString(blockname), blocknum,
LLMessageStringTable::getInstance()->getString(varname));