diff options
author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-03-18 16:10:24 -0400 |
---|---|---|
committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-03-18 16:10:24 -0400 |
commit | af721d3f54c02e6d6202b0165978db72134eb14f (patch) | |
tree | 5f6b915c9de0d6698d18d94fd3478d2d502857f1 /indra/newview | |
parent | ae371d0411693b970ef5663ac53bbe87285b2f4b (diff) |
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.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lltexturecache.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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<U32>::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); |