summaryrefslogtreecommitdiff
path: root/src/lib/content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-03-07 10:57:33 +0000
committerCarl Hetherington <cth@carlh.net>2014-03-07 10:57:33 +0000
commit08d62727f7f1c813cbc7041027fe4a52518623da (patch)
tree756e38e4ad5ee2bdb51690e8a6fb149909c53712 /src/lib/content.cc
parent09806bc8d6a48fc79d923ec1cdf6f90176bf8b6a (diff)
operator bool on Time is a really bad idea; removed it and fixed lots of bugs.
Diffstat (limited to 'src/lib/content.cc')
-rw-r--r--src/lib/content.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/content.cc b/src/lib/content.cc
index 4493c67c0..814d9c1a5 100644
--- a/src/lib/content.cc
+++ b/src/lib/content.cc
@@ -96,11 +96,11 @@ Content::Content (shared_ptr<const Film> f, vector<shared_ptr<Content> > c)
, _change_signals_frequent (false)
{
for (size_t i = 0; i < c.size(); ++i) {
- if (i > 0 && c[i]->trim_start ()) {
+ if (i > 0 && c[i]->trim_start() > DCPTime()) {
throw JoinError (_("Only the first piece of content to be joined can have a start trim."));
}
- if (i < (c.size() - 1) && c[i]->trim_end ()) {
+ if (i < (c.size() - 1) && c[i]->trim_end () > DCPTime()) {
throw JoinError (_("Only the last piece of content to be joined can have an end trim."));
}
@@ -201,7 +201,7 @@ Content::clone () const
string
Content::technical_summary () const
{
- return String::compose ("%1 %2 %3", path_summary(), digest(), position());
+ return String::compose ("%1 %2 %3", path_summary(), digest(), position().seconds());
}
DCPTime
@@ -219,9 +219,9 @@ Content::identifier () const
stringstream s;
s << Content::digest()
- << "_" << position()
- << "_" << trim_start()
- << "_" << trim_end();
+ << "_" << position().get()
+ << "_" << trim_start().get()
+ << "_" << trim_end().get();
return s.str ();
}