]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Resource.cc
stream-based logging classes
[chaz/yoink] / src / Moof / Resource.cc
index a9ff22da9eb68c1300055fca4337bbcbf62d848e..ff4213ec7d3e04e877704a949313f72f00df2e84 100644 (file)
@@ -41,9 +41,6 @@ namespace Mf {
 std::vector<std::string> Resource::searchPaths_;
 
 
-Resource::~Resource() {}
-
-
 void Resource::addSearchPath(const std::string& directory)
 {
        std::string path(directory);
@@ -56,7 +53,7 @@ void Resource::addSearchPath(const std::string& directory)
                path += '/';
        }
 
-#if defined(__WIN32__) || defined(_WIN32) || defined(_WIN64)
+#if defined(_WIN32) || defined(__WIN32__)
        boost::replace_all(path, "/", "\\");
 #endif
 
@@ -69,7 +66,7 @@ std::string Resource::getPath(const std::string& name)
 
        std::string path(name);
 
-#if defined(__WIN32__) || defined(_WIN32) || defined(_WIN64)
+#if defined(_WIN32) || defined(__WIN32__)
        boost::replace_all(path, "/", "\\");
 #endif
 
@@ -78,15 +75,11 @@ std::string Resource::getPath(const std::string& name)
                std::string fullPath(*it);
                fullPath += path;
 
-               logDebug("looking for resource %s at %s", name.c_str(), path.c_str());
-
-               if (access(fullPath.c_str(), R_OK) == 0)
-               {
-                       logDebug("found resource %s at %s", name.c_str(), path.c_str());
-                       return fullPath;
-               }
+               if (access(fullPath.c_str(), R_OK) == 0) return fullPath;
        }
 
+       logWarning << "cannot find resource " << name << std::endl;
+
        // empty string
        return std::string();
 }
This page took 0.018545 seconds and 4 git commands to generate.