From 07d94b9b4868fad26c9e8ac2ae4901849a09b8ac Mon Sep 17 00:00:00 2001 From: John Emmas Date: Sun, 4 Aug 2013 15:17:19 +0100 Subject: 'libs/ardour' - Use 'std::vector' instead of dynamically sized arrays (required to be buildable with MSVC) --- libs/ardour/export_graph_builder.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libs/ardour/export_graph_builder.cc') diff --git a/libs/ardour/export_graph_builder.cc b/libs/ardour/export_graph_builder.cc index c7875c0b9b..127546e8fc 100644 --- a/libs/ardour/export_graph_builder.cc +++ b/libs/ardour/export_graph_builder.cc @@ -20,6 +20,8 @@ #include "ardour/export_graph_builder.h" +#include + #include #include "audiographer/process_context.h" @@ -317,8 +319,8 @@ ExportGraphBuilder::Normalizer::Normalizer (ExportGraphBuilder & parent, FileSpe { std::string tmpfile_path = parent.session.session_directory().export_path(); tmpfile_path = Glib::build_filename(tmpfile_path, "XXXXXX"); - char tmpfile_path_buf[tmpfile_path.size() + 1]; - std::copy(tmpfile_path.begin(), tmpfile_path.end(), tmpfile_path_buf); + std::vector tmpfile_path_buf(tmpfile_path.size() + 1); + std::copy(tmpfile_path.begin(), tmpfile_path.end(), tmpfile_path_buf.begin()); tmpfile_path_buf[tmpfile_path.size()] = '\0'; config = new_config; @@ -334,7 +336,7 @@ ExportGraphBuilder::Normalizer::Normalizer (ExportGraphBuilder & parent, FileSpe normalizer->add_output (threader); int format = ExportFormatBase::F_RAW | ExportFormatBase::SF_Float; - tmp_file.reset (new TmpFile (tmpfile_path_buf, format, channels, config.format->sample_rate())); + tmp_file.reset (new TmpFile (&tmpfile_path_buf[0], format, channels, config.format->sample_rate())); tmp_file->FileWritten.connect_same_thread (post_processing_connection, boost::bind (&Normalizer::start_post_processing, this)); -- cgit v1.2.3