aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/support/include_entity_resolver.cc15
-rw-r--r--src/support/include_entity_resolver.h5
2 files changed, 5 insertions, 15 deletions
diff --git a/src/support/include_entity_resolver.cc b/src/support/include_entity_resolver.cc
index 68af11a..948a61b 100644
--- a/src/support/include_entity_resolver.cc
+++ b/src/support/include_entity_resolver.cc
@@ -35,18 +35,7 @@ namespace InputXSLT {
IncludeEntityResolver::IncludeEntityResolver(
const std::vector<std::string>& path):
- path_() {
- this->path_.reserve(path.size());
-
- std::transform(
- path.begin(),
- path.end(),
- std::back_inserter(this->path_),
- [](const std::string& path) -> FilesystemContext {
- return FilesystemContext(path);
- }
- );
-}
+ path_(path.begin(), path.end()) { }
xercesc::InputSource* IncludeEntityResolver::resolveEntity(
const XMLCh* const,
@@ -70,7 +59,7 @@ xercesc::InputSource* IncludeEntityResolver::resolveEntity(
}
boost::optional<boost::filesystem::path> IncludeEntityResolver::resolve(
- const std::string& filePath) {
+ const std::string& filePath) const {
for ( auto&& context : this->path_ ) {
const boost::filesystem::path resolvedPath(
context.resolve(filePath)
diff --git a/src/support/include_entity_resolver.h b/src/support/include_entity_resolver.h
index 1a3bbc1..28992d6 100644
--- a/src/support/include_entity_resolver.h
+++ b/src/support/include_entity_resolver.h
@@ -22,10 +22,11 @@ class IncludeEntityResolver : public xercesc::EntityResolver {
const XMLCh* const
);
- boost::optional<boost::filesystem::path> resolve(const std::string&);
+ boost::optional<boost::filesystem::path> resolve(
+ const std::string&) const;
private:
- std::vector<FilesystemContext> path_;
+ const std::vector<FilesystemContext> path_;
};