diff options
Diffstat (limited to 'indra/newview/llvocache.cpp')
-rw-r--r-- | indra/newview/llvocache.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp index dd5b9f9fd5..b989f739b4 100644 --- a/indra/newview/llvocache.cpp +++ b/indra/newview/llvocache.cpp @@ -40,17 +40,17 @@ F32 LLVOCacheEntry::sNearRadius = 1.0f; F32 LLVOCacheEntry::sRearFarRadius = 1.0f; F32 LLVOCacheEntry::sFrontPixelThreshold = 1.0f; F32 LLVOCacheEntry::sRearPixelThreshold = 1.0f; -BOOL LLVOCachePartition::sNeedsOcclusionCheck = FALSE; +bool LLVOCachePartition::sNeedsOcclusionCheck = false; const S32 ENTRY_HEADER_SIZE = 6 * sizeof(S32); const S32 MAX_ENTRY_BODY_SIZE = 10000; -BOOL check_read(LLAPRFile* apr_file, void* src, S32 n_bytes) +bool check_read(LLAPRFile* apr_file, void* src, S32 n_bytes) { return apr_file->read(src, n_bytes) == n_bytes ; } -BOOL check_write(LLAPRFile* apr_file, void* src, S32 n_bytes) +bool check_write(LLAPRFile* apr_file, void* src, S32 n_bytes) { return apr_file->write(src, n_bytes) == n_bytes ; } @@ -161,7 +161,7 @@ LLVOCacheEntry::LLVOCacheEntry(U32 local_id, U32 crc, LLDataPackerBinaryBuffer & mCRCChangeCount(0), mState(INACTIVE), mSceneContrib(0.f), - mValid(TRUE), + mValid(true), mParentID(0), mBSphereRadius(-1.0f) { @@ -181,7 +181,7 @@ LLVOCacheEntry::LLVOCacheEntry() mBuffer(NULL), mState(INACTIVE), mSceneContrib(0.f), - mValid(TRUE), + mValid(true), mParentID(0), mBSphereRadius(-1.0f) { @@ -194,12 +194,12 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file) mUpdateFlags(-1), mState(INACTIVE), mSceneContrib(0.f), - mValid(FALSE), + mValid(false), mParentID(0), mBSphereRadius(-1.0f) { S32 size = -1; - BOOL success; + bool success; static U8 data_buffer[ENTRY_HEADER_SIZE]; mDP.assignBuffer(mBuffer, 0); @@ -221,7 +221,7 @@ LLVOCacheEntry::LLVOCacheEntry(LLAPRFile* apr_file) // We won't bother seeking, because the rest of this file // is likely bogus, and will be tossed anyway. LL_WARNS() << "Bogus cache entry, size " << size << ", aborting!" << LL_ENDL; - success = FALSE; + success = false; } } if(success && size > 0) @@ -1009,7 +1009,7 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion) } if(LLViewerOctreeEntryData::getCurrentFrame() % seed != mIdleHash) { - mFrontCull = FALSE; + mFrontCull = false; //process back objects selection selectBackObjects(camera, LLVOCacheEntry::getSquaredPixelThreshold(mFrontCull), @@ -1026,7 +1026,7 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion) LLVector3 region_agent = mRegionp->getOriginAgent(); camera.calcRegionFrustumPlanes(region_agent, gAgentCamera.mDrawDistance); - mFrontCull = TRUE; + mFrontCull = true; LLVOCacheOctreeCull culler(&camera, mRegionp, region_agent, do_occlusion && use_object_cache_occlusion, LLVOCacheEntry::getSquaredPixelThreshold(mFrontCull), this); culler.traverse(mOctree); @@ -1039,10 +1039,10 @@ S32 LLVOCachePartition::cull(LLCamera &camera, bool do_occlusion) } #endif // LL_TEST -void LLVOCachePartition::setCullHistory(BOOL has_new_object) +void LLVOCachePartition::setCullHistory(bool has_new_object) { mCullHistory <<= 1; - mCullHistory |= has_new_object; + mCullHistory |= static_cast<U32>(has_new_object); } void LLVOCachePartition::addOccluders(LLViewerOctreeGroup* gp) @@ -1081,7 +1081,7 @@ void LLVOCachePartition::processOccluders(LLCamera* camera) //safe to clear mOccludedGroups here because only the world camera accesses it. mOccludedGroups.clear(); - sNeedsOcclusionCheck = FALSE; + sNeedsOcclusionCheck = false; } void LLVOCachePartition::resetOccluders() @@ -1097,7 +1097,7 @@ void LLVOCachePartition::resetOccluders() group->clearOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION); } mOccludedGroups.clear(); - sNeedsOcclusionCheck = FALSE; + sNeedsOcclusionCheck = false; } void LLVOCachePartition::removeOccluder(LLVOCacheGroup* group) @@ -1465,12 +1465,12 @@ void LLVOCache::writeCacheHeader() if(!success) { clearCacheInMemory() ; - mReadOnly = TRUE ; //disable the cache. + mReadOnly = true ; //disable the cache. } return ; } -BOOL LLVOCache::updateEntry(const HeaderEntryInfo* entry) +bool LLVOCache::updateEntry(const HeaderEntryInfo* entry) { LLAPRFile apr_file(mHeaderFileName, APR_WRITE|APR_BINARY, mLocalAPRFilePoolp); apr_file.seek(APR_SET, entry->mIndex * sizeof(HeaderEntryInfo) + sizeof(HeaderMetaInfo)) ; @@ -1636,7 +1636,7 @@ void LLVOCache::purgeEntries(U32 size) mNumEntries = mHandleEntryMap.size() ; } -void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, BOOL dirty_cache, bool removal_enabled) +void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_entry_map_t& cache_entry_map, bool dirty_cache, bool removal_enabled) { if(!mEnabled) { @@ -1759,7 +1759,7 @@ void LLVOCache::writeToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry: return ; } -void LLVOCache::writeGenericExtrasToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map, BOOL dirty_cache, bool removal_enabled) +void LLVOCache::writeGenericExtrasToCache(U64 handle, const LLUUID& id, const LLVOCacheEntry::vocache_gltf_overrides_map_t& cache_extras_entry_map, bool dirty_cache, bool removal_enabled) { if(!mEnabled) { |