diff 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
line wrap: on
line diff
--- a/engine/core/util/resource/resource_location.h	Thu Oct 09 08:23:13 2008 +0000
+++ b/engine/core/util/resource/resource_location.h	Thu Oct 09 12:36:21 2008 +0000
@@ -72,13 +72,7 @@
 		 *  This is needed as the locations should be stored in a \c std::map
 		 */
 		virtual bool operator <(const ResourceLocation& loc) const {
-			if (m_filename < loc.m_filename) {
-				return true;
-			}
-			if (m_filename != loc.m_filename) {
-				return false;
-			}
-			return true;
+			return m_filename < loc.m_filename;
 		}
 
 		/** Creates copy of this location