Change return type of Session::import_audiofiles to void as the int return value was not used
git-svn-id: svn://localhost/ardour2/trunk@2677 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
a39a9ea2d4
commit
db718a7f17
|
@ -582,7 +582,7 @@ class Session : public PBD::StatefulDestructible
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
int import_audiofiles (import_status&);
|
void import_audiofiles (import_status&);
|
||||||
bool sample_rate_convert (import_status&, string infile, string& outfile);
|
bool sample_rate_convert (import_status&, string infile, string& outfile);
|
||||||
string build_tmp_convert_name (string file);
|
string build_tmp_convert_name (string file);
|
||||||
|
|
||||||
|
|
|
@ -231,7 +231,7 @@ remove_file_source (boost::shared_ptr<AudioFileSource> file_source)
|
||||||
sys::remove (std::string(file_source->path()));
|
sys::remove (std::string(file_source->path()));
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
void
|
||||||
Session::import_audiofiles (import_status& status)
|
Session::import_audiofiles (import_status& status)
|
||||||
{
|
{
|
||||||
uint32_t cnt = 1;
|
uint32_t cnt = 1;
|
||||||
|
@ -254,7 +254,7 @@ Session::import_audiofiles (import_status& status)
|
||||||
{
|
{
|
||||||
error << string_compose(_("Import: cannot open input sound file \"%1\""), (*p)) << endmsg;
|
error << string_compose(_("Import: cannot open input sound file \"%1\""), (*p)) << endmsg;
|
||||||
status.done = status.cancel = true;
|
status.done = status.cancel = true;
|
||||||
return -1;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
vector<string> new_paths = get_paths_for_new_sources (*p,
|
vector<string> new_paths = get_paths_for_new_sources (*p,
|
||||||
|
@ -280,8 +280,6 @@ Session::import_audiofiles (import_status& status)
|
||||||
write_audio_data_to_new_files (source.get(), status, newfiles);
|
write_audio_data_to_new_files (source.get(), status, newfiles);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ret = -1;
|
|
||||||
|
|
||||||
if (!status.cancel) {
|
if (!status.cancel) {
|
||||||
struct tm* now;
|
struct tm* now;
|
||||||
time_t xnow;
|
time_t xnow;
|
||||||
|
@ -304,14 +302,10 @@ Session::import_audiofiles (import_status& status)
|
||||||
|
|
||||||
std::copy (all_new_sources.begin(), all_new_sources.end(),
|
std::copy (all_new_sources.begin(), all_new_sources.end(),
|
||||||
std::back_inserter(status.sources));
|
std::back_inserter(status.sources));
|
||||||
|
|
||||||
ret = 0;
|
|
||||||
} else {
|
} else {
|
||||||
// this can throw...but it seems very unlikely
|
// this can throw...but it seems very unlikely
|
||||||
std::for_each (all_new_sources.begin(), all_new_sources.end(), remove_file_source);
|
std::for_each (all_new_sources.begin(), all_new_sources.end(), remove_file_source);
|
||||||
}
|
}
|
||||||
|
|
||||||
status.done = true;
|
status.done = true;
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user