[build] switch to c++11

Conflicts:
	Makefile.in
	chunker/cache_stream.cc
	chunker/cache_stream.h
	thin-provisioning/thin_archive.cc
	thin-provisioning/thin_show_duplicates.cc
	unit-tests/Makefile.in
This commit is contained in:
Joe Thornber
2016-02-04 09:02:42 +00:00
parent 639af9c3bf
commit 767c39cf71
14 changed files with 31 additions and 30 deletions

View File

@@ -63,16 +63,16 @@ namespace {
//----------------------------------------------------------------
std::auto_ptr<base::progress_monitor>
std::unique_ptr<base::progress_monitor>
base::create_progress_bar(std::string const &title)
{
return auto_ptr<progress_monitor>(new progress_bar(title));
return unique_ptr<progress_monitor>(new progress_bar(title));
}
std::auto_ptr<base::progress_monitor>
std::unique_ptr<base::progress_monitor>
base::create_quiet_progress_monitor()
{
return auto_ptr<progress_monitor>(new quiet_progress());
return unique_ptr<progress_monitor>(new quiet_progress());
}
//----------------------------------------------------------------

View File

@@ -15,8 +15,8 @@ namespace base {
virtual void update_percent(unsigned) = 0;
};
std::auto_ptr<progress_monitor> create_progress_bar(std::string const &title);
std::auto_ptr<progress_monitor> create_quiet_progress_monitor();
std::unique_ptr<progress_monitor> create_progress_bar(std::string const &title);
std::unique_ptr<progress_monitor> create_quiet_progress_monitor();
}
//----------------------------------------------------------------

View File

@@ -14,7 +14,7 @@ xml_parser::parse(std::string const &backup_file, bool quiet)
persistent_data::check_file_exists(backup_file);
ifstream in(backup_file.c_str(), ifstream::in);
std::auto_ptr<base::progress_monitor> monitor = create_monitor(quiet);
std::unique_ptr<base::progress_monitor> monitor = create_monitor(quiet);
size_t total = 0;
size_t input_length = get_file_length(backup_file);
@@ -53,7 +53,7 @@ xml_parser::get_file_length(string const &file) const
return info.st_size;
}
auto_ptr<base::progress_monitor>
unique_ptr<base::progress_monitor>
xml_parser::create_monitor(bool quiet)
{
if (!quiet && isatty(fileno(stdout)))

View File

@@ -37,7 +37,7 @@ namespace xml_utils {
private:
size_t get_file_length(string const &file) const;
auto_ptr<base::progress_monitor> create_monitor(bool quiet);
unique_ptr<base::progress_monitor> create_monitor(bool quiet);
XML_Parser parser_;
};