projects
/
libdcp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix PKL path when using customised filenames.
[libdcp.git]
/
src
/
dcp_time.cc
diff --git
a/src/dcp_time.cc
b/src/dcp_time.cc
index 526c784c95b09bff127aba1900d501281972a5d6..d397d9d7153d9b7728aa4b49e7526ee1413dc187 100644
(file)
--- a/
src/dcp_time.cc
+++ b/
src/dcp_time.cc
@@
-330,18
+330,15
@@
dcp::operator/ (Time a, Time const & b)
string
Time::as_string (Standard standard) const
{
string
Time::as_string (Standard standard) const
{
- locked_stringstream str;
- str << setw(2) << setfill('0') << h << ":"
- << setw(2) << setfill('0') << m << ":"
- << setw(2) << setfill('0') << s << ":";
+ char buffer[64];
if (standard == SMPTE) {
if (standard == SMPTE) {
- s
tr << setw(2) << setfill('0') << e
;
+ s
nprintf (buffer, sizeof(buffer), "%02d:%02d:%02d:%02d", h, m, s, e)
;
} else {
} else {
- s
tr << setw(3) << setfill('0') << e
;
+ s
nprintf (buffer, sizeof(buffer), "%02d:%02d:%02d:%03d", h, m, s, e)
;
}
}
- return
str.str ()
;
+ return
buffer
;
}
/** @param tcr_ Timecode rate with which the return value should be counted.
}
/** @param tcr_ Timecode rate with which the return value should be counted.