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 8dad833eaa..2b07d1ab2b 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 ; } @@ -165,7 +165,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) { @@ -185,7 +185,7 @@ LLVOCacheEntry::LLVOCacheEntry() mBuffer(NULL), mState(INACTIVE), mSceneContrib(0.f), - mValid(TRUE), + mValid(true), mParentID(0), mBSphereRadius(-1.0f) { @@ -198,12 +198,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); @@ -225,7 +225,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) @@ -1015,7 +1015,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), @@ -1032,7 +1032,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); @@ -1045,10 +1045,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) @@ -1087,7 +1087,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() @@ -1103,7 +1103,7 @@ void LLVOCachePartition::resetOccluders() group->clearOcclusionState(LLOcclusionCullingGroup::ACTIVE_OCCLUSION); } mOccludedGroups.clear(); - sNeedsOcclusionCheck = FALSE; + sNeedsOcclusionCheck = false; } void LLVOCachePartition::removeOccluder(LLVOCacheGroup* group) @@ -1490,12 +1490,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)) ; @@ -1719,7 +1719,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) { std::string filename; getObjectCacheFilename(handle, filename); @@ -1873,7 +1873,7 @@ void LLVOCache::removeGenericExtrasForHandle(U64 handle) } } -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) { |