comparison engine/core/util/resource/resource_location.h @ 146:54b3984e1afc

The getIndex function was a hack that shadowed another bug that caused the pools to misbehave. AddResourceFromFile works now exactly as getIndex, it's just faster. Fixed GUIImage to not hold a reference, it uses the index directly anyway. Plus heaps of minor adjustments for more informative debug output and statistics.
author phoku@33b003aa-7bff-0310-803a-e67f0ece8222
date Thu, 09 Oct 2008 12:36:21 +0000
parents 90005975cdbb
children fb6ccb367dd1
comparison
equal deleted inserted replaced
145:e7a431577c95 146:54b3984e1afc
70 70
71 /** Compares two ResourceLocations 71 /** Compares two ResourceLocations
72 * This is needed as the locations should be stored in a \c std::map 72 * This is needed as the locations should be stored in a \c std::map
73 */ 73 */
74 virtual bool operator <(const ResourceLocation& loc) const { 74 virtual bool operator <(const ResourceLocation& loc) const {
75 if (m_filename < loc.m_filename) { 75 return m_filename < loc.m_filename;
76 return true;
77 }
78 if (m_filename != loc.m_filename) {
79 return false;
80 }
81 return true;
82 } 76 }
83 77
84 /** Creates copy of this location 78 /** Creates copy of this location
85 * All derived classes must implement this and return their corresponding instance 79 * All derived classes must implement this and return their corresponding instance
86 */ 80 */