From e8c4fd0e0581849fcf41d918e79b00b84fe24d70 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 12 Feb 2014 23:25:57 +0000 Subject: Various small fixes. --- src/util.cc | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/util.cc') diff --git a/src/util.cc b/src/util.cc index 4be026d2..1e32fbc9 100644 --- a/src/util.cc +++ b/src/util.cc @@ -54,7 +54,10 @@ using std::max; using std::list; using std::setw; using std::setfill; +using std::ostream; using boost::shared_ptr; +using boost::optional; +using boost::function; using namespace dcp; /** Create a UUID. @@ -73,12 +76,12 @@ dcp::make_uuid () /** Create a digest for a file. * @param filename File name. - * @param progress Pointer to a progress reporting function, or 0. The function will be called + * @param progress Optional progress reporting function. The function will be called * with a progress value between 0 and 1. * @return Digest. */ string -dcp::make_digest (boost::filesystem::path filename, boost::function* progress) +dcp::make_digest (boost::filesystem::path filename, function progress) { Kumu::FileReader reader; Kumu::Result_t r = reader.OpenRead (filename.string().c_str ()); @@ -107,7 +110,7 @@ dcp::make_digest (boost::filesystem::path filename, boost::function +optional dcp::relative_to_root (boost::filesystem::path root, boost::filesystem::path file) { boost::filesystem::path::const_iterator i = root.begin (); @@ -397,7 +406,7 @@ dcp::relative_to_root (boost::filesystem::path root, boost::filesystem::path fil } if (i != root.end ()) { - return boost::optional (); + return optional (); } boost::filesystem::path rel; -- cgit v1.2.3