summaryrefslogtreecommitdiff
path: root/indra/newview/llvlmanager.cpp
diff options
context:
space:
mode:
authorGraham Linden <graham@lindenlab.com>2014-05-29 04:54:58 -0700
committerGraham Linden <graham@lindenlab.com>2014-05-29 04:54:58 -0700
commita815ad481add3dea3f67f1c1c579ddb99d9a9f48 (patch)
treee3cf5b5b77246e8cf4917e613cbffe7e414be63c /indra/newview/llvlmanager.cpp
parentb703a612d7ca96e9c79f40a33208757bba6e9d7e (diff)
parent644ca6a0f8a7759119814f88df93b8e838321a12 (diff)
Mergeup to 3.7.9 viewer-release
Diffstat (limited to 'indra/newview/llvlmanager.cpp')
-rwxr-xr-xindra/newview/llvlmanager.cpp42
1 files changed, 23 insertions, 19 deletions
diff --git a/indra/newview/llvlmanager.cpp b/indra/newview/llvlmanager.cpp
index d8de979f56..895ceed880 100755
--- a/indra/newview/llvlmanager.cpp
+++ b/indra/newview/llvlmanager.cpp
@@ -29,45 +29,49 @@
#include "llvlmanager.h"
#include "indra_constants.h"
-#include "bitpack.h"
#include "patch_code.h"
#include "patch_dct.h"
#include "llviewerregion.h"
#include "llframetimer.h"
#include "llsurface.h"
+#include "llbitpack.h"
+
+const char LAND_LAYER_CODE = 'L';
+const char WIND_LAYER_CODE = '7';
+const char CLOUD_LAYER_CODE = '8';
LLVLManager gVLManager;
LLVLManager::~LLVLManager()
{
S32 i;
- for (i = 0; i < mPacketData.count(); i++)
+ for (i = 0; i < mPacketData.size(); i++)
{
delete mPacketData[i];
}
- mPacketData.reset();
+ mPacketData.clear();
}
-void LLVLManager::addLayerData(LLVLData *vl_datap, const S32 mesg_size)
+void LLVLManager::addLayerData(LLVLData *vl_datap, const S32Bytes mesg_size)
{
if (LAND_LAYER_CODE == vl_datap->mType)
{
- mLandBits += mesg_size * 8;
+ mLandBits += mesg_size;
}
else if (WIND_LAYER_CODE == vl_datap->mType)
{
- mWindBits += mesg_size * 8;
+ mWindBits += mesg_size;
}
else if (CLOUD_LAYER_CODE == vl_datap->mType)
{
- mCloudBits += mesg_size * 8;
+ mCloudBits += mesg_size;
}
else
{
- llerrs << "Unknown layer type!" << (S32)vl_datap->mType << llendl;
+ LL_ERRS() << "Unknown layer type!" << (S32)vl_datap->mType << LL_ENDL;
}
- mPacketData.put(vl_datap);
+ mPacketData.push_back(vl_datap);
}
void LLVLManager::unpackData(const S32 num_packets)
@@ -75,7 +79,7 @@ void LLVLManager::unpackData(const S32 num_packets)
static LLFrameTimer decode_timer;
S32 i;
- for (i = 0; i < mPacketData.count(); i++)
+ for (i = 0; i < mPacketData.size(); i++)
{
LLVLData *datap = mPacketData[i];
@@ -98,35 +102,35 @@ void LLVLManager::unpackData(const S32 num_packets)
}
}
- for (i = 0; i < mPacketData.count(); i++)
+ for (i = 0; i < mPacketData.size(); i++)
{
delete mPacketData[i];
}
- mPacketData.reset();
+ mPacketData.clear();
}
void LLVLManager::resetBitCounts()
{
- mLandBits = mWindBits = mCloudBits = 0;
+ mLandBits = mWindBits = mCloudBits = (S32Bits)0;
}
-S32 LLVLManager::getLandBits() const
+U32Bits LLVLManager::getLandBits() const
{
return mLandBits;
}
-S32 LLVLManager::getWindBits() const
+U32Bits LLVLManager::getWindBits() const
{
return mWindBits;
}
-S32 LLVLManager::getCloudBits() const
+U32Bits LLVLManager::getCloudBits() const
{
return mCloudBits;
}
-S32 LLVLManager::getTotalBytes() const
+S32Bytes LLVLManager::getTotalBytes() const
{
return mLandBits + mWindBits + mCloudBits;
}
@@ -134,12 +138,12 @@ S32 LLVLManager::getTotalBytes() const
void LLVLManager::cleanupData(LLViewerRegion *regionp)
{
S32 cur = 0;
- while (cur < mPacketData.count())
+ while (cur < mPacketData.size())
{
if (mPacketData[cur]->mRegionp == regionp)
{
delete mPacketData[cur];
- mPacketData.remove(cur);
+ mPacketData.erase(mPacketData.begin() + cur);
}
else
{