From 65aa84877bb6fa74a8ab0b6fdbb81b7669a5c490 Mon Sep 17 00:00:00 2001
From: Bartosz Broda <bartosz.broda@gmail.com>
Date: Sun, 30 Oct 2011 16:31:40 +0100
Subject: [PATCH] fixes for new boost::filesystem

---
 tests/datarule.cpp       | 8 ++++----
 wccl-apps/wccl-rules.cpp | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/datarule.cpp b/tests/datarule.cpp
index 6a91c82..33394c2 100644
--- a/tests/datarule.cpp
+++ b/tests/datarule.cpp
@@ -77,7 +77,7 @@ boost::shared_ptr<Corpus2::Chunk> get_corpus(const std::string& path, const Corp
 	} else {
 		boost::shared_ptr<Corpus2::Chunk> chunk;
 		boost::filesystem::path fp(path);
-		std::string fn = fp.filename();
+		std::string fn = fp.filename().c_str();
 		if (fn.find("ccl") == fn.npos) {
 			Corpus2::XcesReader xr(tagset, path);
 			chunk = xr.get_next_chunk();
@@ -168,7 +168,7 @@ void test_one_rule_item_actual(const rule_compare_test& c)
 		BOOST_ERROR("Empty chunk loaded");
 	}
 	boost::shared_ptr<Corpus2::TokenReader> reader;
-	std::string ofn = c.output_corpus.filename();
+	std::string ofn = c.output_corpus.filename().c_str();
 	if (ofn.find("ccl") != ofn.npos || ofn.find("match") != ofn.npos) {
 		reader = Corpus2::TokenReader::create_path_reader("ccl", tagset, c.output_corpus.string());
 	} else {
@@ -229,11 +229,11 @@ int init_subdir(const path& dir, std::string ps, std::vector<rule_compare_test>&
 			if (itr->path().extension() == ".ccl") {
 				txt_tests.insert(itr->path());
 			} else if (itr->path().extension() == ".xml") {
-				if (!boost::algorithm::ends_with(itr->path().stem(), ".out")) {
+				if (!boost::algorithm::ends_with(itr->path().stem().c_str(), ".out")) {
 					status.input = itr->path();
 				}
 			} else if (itr->path().extension() == ".is-the-tagset") {
-				status.tagset = itr->path().stem();
+				status.tagset = itr->path().stem().c_str();
 			}
 		}
 	}
diff --git a/wccl-apps/wccl-rules.cpp b/wccl-apps/wccl-rules.cpp
index a3977f1..c67bf10 100644
--- a/wccl-apps/wccl-rules.cpp
+++ b/wccl-apps/wccl-rules.cpp
@@ -111,7 +111,7 @@ std::pair<int,int> RuleRunner::load_more_rules(const std::string& filename)
 		parsed_file = parser_.parseWcclFile(is, search_path_);
 		if (parsed_file) {
 			boost::filesystem::path p(filename);
-			file_names_.push_back(p.stem());
+			file_names_.push_back(p.stem().c_str());
 			size_t match_rules = 0, tag_rules = 0;
 			if (parsed_file->has_tag_rules()) {
 				tag_rules = parsed_file->get_tag_rules().size();
-- 
GitLab