From af721d3f54c02e6d6202b0165978db72134eb14f Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Thu, 18 Mar 2010 16:10:24 -0400 Subject: fixing linux build errors from bao's checkin for EXT-6093 viewer wouldn't compile under linux, due to gcc being paranoid about a few things. Fixed them up and got them reviewed. Code reviewed by bao. --- indra/newview/lltexturecache.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 54ac3850fd..7a0712f8aa 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1150,7 +1150,7 @@ void LLTextureCache::readEntryFromHeaderImmediately(S32 idx, Entry& entry) //update an existing entry time stamp, delay writing. void LLTextureCache::updateEntryTimeStamp(S32 idx, Entry& entry) { - static const U32 MAX_ENTRIES_WITHOUT_TIME_STAMP = (U32)LLTextureCache::sCacheMaxEntries * 0.75f ; + static const U32 MAX_ENTRIES_WITHOUT_TIME_STAMP = (U32)(LLTextureCache::sCacheMaxEntries * 0.75f) ; if(mHeaderEntriesInfo.mEntries < MAX_ENTRIES_WITHOUT_TIME_STAMP) { @@ -1393,7 +1393,8 @@ void LLTextureCache::readHeaderCache() { for (std::set::iterator iter = purge_list.begin(); iter != purge_list.end(); ++iter) { - removeEntry(*iter, entries[*iter], getTextureFileName(entries[*iter].mID)); + std::string tex_filename = getTextureFileName(entries[*iter].mID); + removeEntry((S32)*iter, entries[*iter], tex_filename); } // If we removed any entries, we need to rebuild the entries list, // write the header, and call this again @@ -1803,7 +1804,8 @@ bool LLTextureCache::removeFromCache(const LLUUID& id) Entry entry; S32 idx = openAndReadEntry(id, entry, false); - removeEntry(idx, entry, getTextureFileName(id)) ; + std::string tex_filename = getTextureFileName(id); + removeEntry(idx, entry, tex_filename) ; if (idx >= 0) { writeEntryToHeaderImmediately(idx, entry); -- cgit v1.2.3