Trim some unused stream includes / usings.
authorCarl Hetherington <cth@carlh.net>
Thu, 21 Jul 2016 10:57:33 +0000 (11:57 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 21 Jul 2016 10:57:33 +0000 (11:57 +0100)
15 files changed:
src/cpl.cc
src/dcp.cc
src/metadata.cc
src/mono_picture_asset_writer.cc
src/mono_picture_asset_writer.h
src/picture_asset.cc
src/picture_asset_writer.cc
src/picture_asset_writer.h
src/reel_asset.cc
src/reel_picture_asset.cc
src/smpte_subtitle_asset.cc
src/sound_asset.cc
src/stereo_picture_asset_writer.cc
src/subtitle_asset.cc
src/util.cc

index 33ef647efefbbeaf49b448ab7baaf06318e7cf1d..0abf864af35570b18058c3ab43c2acc8eef22c4a 100644 (file)
@@ -49,8 +49,6 @@
 #include <boost/foreach.hpp>
 
 using std::string;
-using std::stringstream;
-using std::ostream;
 using std::list;
 using std::pair;
 using std::make_pair;
@@ -207,9 +205,8 @@ CPL::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler not
        }
 
        if (_annotation_text != other_cpl->_annotation_text && !opt.cpl_annotation_texts_can_differ) {
-               stringstream s;
-               s << "CPL: annotation texts differ: " << _annotation_text << " vs " << other_cpl->_annotation_text << "\n";
-               note (DCP_ERROR, s.str ());
+               string const s = "CPL: annotation texts differ: " + _annotation_text + " vs " + other_cpl->_annotation_text + "\n";
+               note (DCP_ERROR, s);
                return false;
        }
 
index 215c6002cf1b2a3da9b4d26c5d50a0929af8edb1..d2fc974536a29e4dc44ca16895c8691725b0a824 100644 (file)
 #include <boost/filesystem.hpp>
 #include <boost/algorithm/string.hpp>
 #include <boost/foreach.hpp>
-#include <iostream>
 
 using std::string;
 using std::list;
 using std::cout;
-using std::ostream;
 using std::make_pair;
 using std::map;
 using std::cout;
index 0e3d7c764c134b5e41f13c198fb5bc304c7f27db..dbe80919063cc71b1fb9f0e7d77c967dbadba4c3 100644 (file)
@@ -39,7 +39,6 @@
 #include "util.h"
 #include "local_time.h"
 #include <asdcp/AS_DCP.h>
-#include <sstream>
 #include <iomanip>
 #include <time.h>
 
index 7c955c1d8fc0d91b46d997083e0aa29dd3bd1942..1ef079dcf9fd233373b1d69887be15cfcce6e65e 100644 (file)
@@ -44,8 +44,6 @@
 
 #include "picture_asset_writer_common.cc"
 
-using std::istream;
-using std::ostream;
 using std::string;
 using boost::shared_ptr;
 using namespace dcp;
index e694e085ec68a662d6c14098428276b18f339be4..532f7ad7575a79f174b05ddbf72f3203e86a882a 100644 (file)
@@ -43,7 +43,6 @@
 #include <boost/utility.hpp>
 #include <stdint.h>
 #include <string>
-#include <fstream>
 
 namespace dcp {
 
index 674180c37b8969c673015d970077a50fa44936b7..a0a7d7d7dbc5f1211be9a926a7c887fcd34a43f5 100644 (file)
 #include <boost/filesystem.hpp>
 #include <list>
 #include <stdexcept>
-#include <iostream>
-#include <sstream>
 
 using std::string;
-using std::ostream;
 using std::list;
 using std::vector;
 using std::max;
-using std::stringstream;
 using std::pair;
 using std::make_pair;
-using std::istream;
-using std::cout;
 using boost::shared_ptr;
 using namespace dcp;
 
index baa98a4f0549d2c6a1f75a528f371430eeb4ba9d..e3d7b70e5079a2628637bce408fe771b105bfc41 100644 (file)
@@ -39,8 +39,6 @@
 #include <inttypes.h>
 #include <stdint.h>
 
-using std::istream;
-using std::ostream;
 using std::string;
 using boost::shared_ptr;
 using namespace dcp;
index 5527537da4688dec74cc4e6261ccdee8e3c01069..1ef519baca5e1c05d709fec4965e93c0b856f5d2 100644 (file)
@@ -45,7 +45,6 @@
 #include <boost/utility.hpp>
 #include <stdint.h>
 #include <string>
-#include <fstream>
 
 namespace dcp {
 
index c4432f212635f7aab6db95586e7c4c5b86273b95..6e1b024ec4598a180b51edaf1f8eabcaa9f73dba 100644 (file)
 #include "compose.hpp"
 #include <libcxml/cxml.h>
 #include <libxml++/libxml++.h>
-#include <iostream>
 
 using std::pair;
 using std::cout;
 using std::string;
-using std::stringstream;
 using std::make_pair;
 using boost::shared_ptr;
 using namespace dcp;
@@ -122,13 +120,12 @@ bool
 ReelAsset::equals (shared_ptr<const ReelAsset> other, EqualityOptions opt, NoteHandler note) const
 {
        if (_annotation_text != other->_annotation_text) {
-               stringstream s;
-               s << "Reel: annotation texts differ (" << _annotation_text << " vs " << other->_annotation_text << ")\n";
+               string const s = "Reel: annotation texts differ (" + _annotation_text + " vs " + other->_annotation_text + ")\n";
                if (!opt.reel_annotation_texts_can_differ) {
-                       note (DCP_ERROR, s.str ());
+                       note (DCP_ERROR, s);
                        return false;
                } else {
-                       note (DCP_NOTE, s.str ());
+                       note (DCP_NOTE, s);
                }
        }
 
index 1c745e4a24b939ef7b75ed10c8e6d3d7db89d32a..de106c794befacb78ef475958aa3b3b858f60eff 100644 (file)
@@ -47,7 +47,6 @@
 
 using std::bad_cast;
 using std::string;
-using std::stringstream;
 using boost::shared_ptr;
 using boost::dynamic_pointer_cast;
 using boost::optional;
index 5bb88621d8611658f2ba5ff6323d083ebd5840d6..0c0181f42d5c1604252d55d37b4e9b40129fc71b 100644 (file)
@@ -52,8 +52,6 @@
 
 using std::string;
 using std::list;
-using std::stringstream;
-using std::cout;
 using std::vector;
 using std::map;
 using boost::shared_ptr;
@@ -85,9 +83,7 @@ SMPTESubtitleAsset::SMPTESubtitleAsset (boost::filesystem::path file)
        if (!ASDCP_FAILURE (r)) {
                string s;
                reader->ReadTimedTextResource (s, 0, 0);
-               stringstream t;
-               t << s;
-               xml->read_stream (t);
+               xml->read_string (s);
                ASDCP::WriterInfo info;
                reader->FillWriterInfo (info);
                _id = read_writer_info (info);
index 613fa57635344d00672d2f3fda5d7be1a037b00b..e3adff45d86dca0a432ef40555d8942111877995 100644 (file)
 #include <asdcp/AS_DCP.h>
 #include <libxml++/nodes/element.h>
 #include <boost/filesystem.hpp>
-#include <iostream>
 #include <stdexcept>
 
 using std::string;
-using std::stringstream;
-using std::ostream;
 using std::vector;
 using std::list;
 using boost::shared_ptr;
index d98df6ae3d7983191f535f84b391be56e136efec..6e43de100e95ac939af2372d3fd69ea21469c3f9 100644 (file)
@@ -40,8 +40,6 @@
 
 #include "picture_asset_writer_common.cc"
 
-using std::istream;
-using std::ostream;
 using std::string;
 using boost::shared_ptr;
 using namespace dcp;
index cb75767390d8fb0cdb8de3c268773027036ba4e7..b9f6336c594928d09c6990aeaf035e2f37c936dd 100644 (file)
 #include <boost/algorithm/string.hpp>
 #include <boost/shared_array.hpp>
 #include <boost/foreach.hpp>
-#include <fstream>
 
 using std::string;
 using std::list;
-using std::ostream;
-using std::ofstream;
-using std::stringstream;
 using std::cout;
 using std::cerr;
 using std::map;
index 359ac317142de7e2c33130c48cddfe2929646f4b..0c3cea08251e09030b40ffef1ce0910c8a3cf2f3 100644 (file)
 #include <boost/filesystem.hpp>
 #include <boost/algorithm/string.hpp>
 #include <stdexcept>
-#include <sstream>
 #include <iostream>
 #include <iomanip>
 
 using std::string;
 using std::wstring;
 using std::cout;
-using std::stringstream;
 using std::min;
 using std::max;
 using std::list;