From 812103cea68f1da2004dd518c5ad3b448a0e1729 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Mon, 14 Feb 2005 00:53:22 +0000 Subject: Simplified logging for the sake of simplicity. --- src/resources/resourcemanager.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) (limited to 'src/resources/resourcemanager.cpp') diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index 582bc613..0d6412d8 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -62,11 +62,8 @@ ResourceManager::~ResourceManager() } resources.clear(); - std::stringstream msg; - msg << "ResourceManager::~ResourceManager() cleaned up " << - danglingReferences << " references to " << danglingResources << - " resources"; - log(msg.str()); + log("ResourceManager::~ResourceManager() cleaned up %d references to %d" + " resources", danglingReferences, danglingResources); } Resource* ResourceManager::get(const E_RESOURCE_TYPE &type, @@ -100,10 +97,10 @@ Resource* ResourceManager::get(const E_RESOURCE_TYPE &type, switch (type) { case MAP: - warning("Map resource not supported."); + log("Warning: Map resource not supported."); break; case MUSIC: - warning("Music resource not supported."); + log("Warning: Music resource not supported."); break; case IMAGE: // Attempt to create and load our image object. @@ -111,16 +108,16 @@ Resource* ResourceManager::get(const E_RESOURCE_TYPE &type, reinterpret_cast(Image::load(filePath, flags)); break; case SCRIPT: - warning("Script resource not supported."); + log("Warning: Script resource not supported."); break; case TILESET: - warning("Tileset resource not supported."); + log("Warning: Tileset resource not supported."); break; case SOUND_EFFECT: - warning("Sound FX resource not supported."); + log("Warning: Sound FX resource not supported."); break; default: - warning("Unknown resource type"); + log("Warning: Unknown resource type"); break; } -- cgit v1.2.3-70-g09d2