]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Resource.cc
big batch of changes
[chaz/yoink] / src / Moof / Resource.cc
index a9ff22da9eb68c1300055fca4337bbcbf62d848e..6f09601bf0d36d07f0dc820523e388ed13334868 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 %s", name.c_str());
+
        // empty string
        return std::string();
 }
This page took 0.019597 seconds and 4 git commands to generate.