summaryrefslogtreecommitdiff
path: root/src/core/resource
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-02-03 02:29:33 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-02-03 02:29:33 +0100
commitbf8ffac02747a2f3c9bd4e7c1f19300f205232d1 (patch)
treecf6c965153ac21be2505367f4f907c10740281d0 /src/core/resource
parent7060df78f37f0d75e32212f24e2327069f5dea94 (diff)
Got rid of warnings when including files
Diffstat (limited to 'src/core/resource')
-rw-r--r--src/core/resource/ResourceRequest.cpp18
1 files changed, 7 insertions, 11 deletions
diff --git a/src/core/resource/ResourceRequest.cpp b/src/core/resource/ResourceRequest.cpp
index 41aec75..1c93288 100644
--- a/src/core/resource/ResourceRequest.cpp
+++ b/src/core/resource/ResourceRequest.cpp
@@ -15,6 +15,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
+#include <iostream>
+
#include <string>
#include <core/common/Logger.hpp>
@@ -73,7 +76,8 @@ supportedResourceTypes(const RttiSet &supportedTypes)
*/
static std::string supportedResourceTypesString(const RttiSet &supportedTypes)
{
- return Utils::join(supportedResourceTypes(supportedTypes), ", ", "{", "}");
+ return Utils::join(supportedResourceTypes(supportedTypes), "\", \"", "\"",
+ "\"");
}
/**
@@ -183,14 +187,6 @@ bool ResourceRequest::deduce(Registry &registry, Logger &logger)
}
}
- // Limit the supportedTypes to those returned by the parser
- supportedTypes = Rtti::setIntersection(parserTypes, supportedTypes);
- if (supportedTypes.empty()) {
- logger.error(std::string("Cannot include or link a file of type \"") +
- mimetype + std::string("\" here!"));
- ok = false;
- }
-
// Try to deduce the ResourceType from the "rel" string
if (!rel.empty()) {
resourceType = Resource::getResourceTypeByName(rel);
@@ -218,8 +214,8 @@ bool ResourceRequest::deduce(Registry &registry, Logger &logger)
std::string("\" cannot be included here"));
ok = false;
}
- } else {
- // Issue a warning if the resource type is unknown
+ } else if (supportedTypes.size() != 1 ||
+ *supportedTypes.begin() != &RttiTypes::Node) {
logger.warning(std::string(
"Ambiguous resource relationship, consider "
"specifying one of ") +