summaryrefslogtreecommitdiff
path: root/tools/bcp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/bcp')
-rw-r--r--tools/bcp/copy_path.cpp14
-rw-r--r--tools/bcp/fileview.cpp2
-rw-r--r--tools/bcp/licence_info.cpp2
-rw-r--r--tools/bcp/main.cpp2
-rw-r--r--tools/bcp/output_licence_info.cpp2
-rw-r--r--tools/bcp/scan_cvs_path.cpp2
-rw-r--r--tools/bcp/scan_licence.cpp4
7 files changed, 17 insertions, 11 deletions
diff --git a/tools/bcp/copy_path.cpp b/tools/bcp/copy_path.cpp
index 4fe897d43d..497dcd5c86 100644
--- a/tools/bcp/copy_path.cpp
+++ b/tools/bcp/copy_path.cpp
@@ -134,7 +134,7 @@ void bcp_implementation::copy_path(const fs::path& p)
"(?|"
"(namespace\\s+)boost(_\\w+)?(?:(\\s*::\\s*)phoenix)?"
"|"
- "(namespace\\s+)(adstl|phoenix|rapidxml)\\>"
+ "(namespace\\s+(?:detail::)?)(adstl|phoenix|rapidxml)\\>"
"|"
"()\\<boost((?:_(?!intrusive_tags)\\w+)?\\s*(?:::))(?:(\\s*)phoenix)?"
"|"
@@ -154,11 +154,15 @@ void bcp_implementation::copy_path(const fs::path& p)
"|"
"(BOOST_CLASS_REQUIRE4?[^;]*)boost((?:_\\w+)?\\s*,)"
"|"
+ "(::tr1::|TR1_DECL\\s+)boost(_\\w+\\s*)" // math tr1
+ "|"
+ "(\\(\\s*)boost(\\s*\\))\\s*(\\(\\s*)phoenix(\\s*\\))"
+ "|"
"(\\(\\s*)boost(\\s*\\))"
")"
);
- regex_replace(std::back_inserter(v2), v1.begin(), v1.end(), namespace_matcher, "$1" + m_namespace_name + "$2(?3$3" + m_namespace_name + "phoenix)", boost::regex_constants::format_all);
+ regex_replace(std::back_inserter(v2), v1.begin(), v1.end(), namespace_matcher, "$1" + m_namespace_name + "$2(?3$3" + m_namespace_name + "phoenix?4$4)", boost::regex_constants::format_all);
std::swap(v1, v2);
v2.clear();
@@ -191,11 +195,11 @@ void bcp_implementation::copy_path(const fs::path& p)
"\\s*\\{.*"
"\\})([^\\{\\};]*)\\z"
*/
- "namespace\\s+" + m_namespace_name +
- "\\s*\\{"
+ "(namespace)(\\s+)(" + m_namespace_name + ")"
+ "(adstl|phoenix|rapidxml)?(\\s*\\{)"
);
regex_replace(std::back_inserter(v2), v1.begin(), v1.end(), namespace_alias,
- "namespace " + m_namespace_name + "{} namespace boost = " + m_namespace_name + "; namespace " + m_namespace_name + "{");
+ "$1 $3$4 {} $1 (?4$4:boost) = $3$4; $1$2$3$4$5", boost::regex_constants::format_all);
std::swap(v1, v2);
v2.clear();
}
diff --git a/tools/bcp/fileview.cpp b/tools/bcp/fileview.cpp
index 761756c156..54b3758551 100644
--- a/tools/bcp/fileview.cpp
+++ b/tools/bcp/fileview.cpp
@@ -38,7 +38,7 @@ fileview::~fileview()
{
}
-fileview::fileview(const fileview& that)
+fileview::fileview(const fileview& )
{
}
diff --git a/tools/bcp/licence_info.cpp b/tools/bcp/licence_info.cpp
index ab34b83c48..0e527fa488 100644
--- a/tools/bcp/licence_info.cpp
+++ b/tools/bcp/licence_info.cpp
@@ -705,7 +705,7 @@ std::pair<const license_info*, int> get_licenses()
)
,
};
- return std::pair<const license_info*, int>(licenses, sizeof(licenses)/sizeof(licenses[0]));
+ return std::pair<const license_info*, int>(licenses, static_cast<int>(sizeof(licenses)/sizeof(licenses[0])));
}
std::string format_authors_name(const std::string& name)
diff --git a/tools/bcp/main.cpp b/tools/bcp/main.cpp
index 28a5491e7c..aab15029d1 100644
--- a/tools/bcp/main.cpp
+++ b/tools/bcp/main.cpp
@@ -47,7 +47,7 @@ void show_usage()
"output-path: the path to which files will be copied\n";
}
-bool filesystem_name_check( const std::string & name )
+bool filesystem_name_check( const std::string & )
{
return true;
}
diff --git a/tools/bcp/output_licence_info.cpp b/tools/bcp/output_licence_info.cpp
index 2349acc83f..d42268fdbf 100644
--- a/tools/bcp/output_licence_info.cpp
+++ b/tools/bcp/output_licence_info.cpp
@@ -28,6 +28,8 @@ struct split_path
const fs::path& file;
split_path(const fs::path& r, const fs::path& f)
: root(r), file(f){}
+private:
+ split_path& operator=(const split_path&);
};
std::ostream& operator << (std::ostream& os, const split_path& p)
diff --git a/tools/bcp/scan_cvs_path.cpp b/tools/bcp/scan_cvs_path.cpp
index 3c5eb2ea58..6d2eb3a600 100644
--- a/tools/bcp/scan_cvs_path.cpp
+++ b/tools/bcp/scan_cvs_path.cpp
@@ -31,7 +31,7 @@ void bcp_implementation::scan_cvs_path(const fs::path& p)
static const boost::regex dir_expression("^(?:A\\s+)?D/([^/\\n]+)/");
static const int file_subs[] = {1,2,};
- for(int entry = 0; entry < sizeof(file_list)/sizeof(file_list[0]); ++entry)
+ for(std::size_t entry = 0; entry < sizeof(file_list)/sizeof(file_list[0]); ++entry)
{
fs::path entries(m_boost_path / p / file_list[entry]);
if(fs::exists(entries))
diff --git a/tools/bcp/scan_licence.cpp b/tools/bcp/scan_licence.cpp
index d1bf0bbebb..c061583a2c 100644
--- a/tools/bcp/scan_licence.cpp
+++ b/tools/bcp/scan_licence.cpp
@@ -27,8 +27,8 @@ context_before_license(const fileview& v, fileview::const_iterator start,
{
char last_char = '\0';
while (start != v.begin() && context_lines >= 0) {
- if (*start == '\r' || *start == '\n'
- && (last_char == *start || (last_char != '\r' && last_char != '\n')))
+ if ((*start == '\r') || (*start == '\n')
+ && ((last_char == *start) || ((last_char != '\r') && (last_char != '\n'))))
--context_lines;
last_char = *start;