summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-01-14 15:30:55 +0000
committerCarl Hetherington <cth@carlh.net>2019-01-14 15:30:55 +0000
commit1f46381c549b5c865a588a1721361c4d34be5a58 (patch)
treedbf103f4e4240a9c92c54353ee5b5a2908ae86ea
parent7e4e6be3628308b7b16c015e2f87b27e729258dc (diff)
Tidy repeated call of make_uuid() and don't put urn:uuid: in front of default content version label text as it's a bit confusing.tidy
-rw-r--r--src/cpl.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cpl.cc b/src/cpl.cc
index cc7237ea..726d69b7 100644
--- a/src/cpl.cc
+++ b/src/cpl.cc
@@ -66,14 +66,14 @@ CPL::CPL (string annotation_text, ContentKind content_kind)
/* default _content_title_text to annotation_text */
: _content_title_text (annotation_text)
, _content_kind (content_kind)
- , _content_version_id ("urn:uuid:" + make_uuid ())
{
_metadata.annotation_text = annotation_text;
/* default _content_version_id to a random ID and _content_version_label to
a random ID and the current time.
*/
- _content_version_id = "urn:uuid:" + make_uuid();
- _content_version_label_text = _content_version_id + LocalTime().as_string ();
+ string const uuid = make_uuid();
+ _content_version_id = "urn:uuid:" + uuid;
+ _content_version_label_text = uuid + LocalTime().as_string ();
}
/** Construct a CPL object from a XML file */