Tiny optimisation; Object default constructor calls make_uuid.
[libdcp.git] / src / util.cc
index 89b563ae7ff437d90af28723f50c110f8685bfc6..86d1bc87d2810e0bfe7f3632e4509b586015447e 100644 (file)
@@ -24,7 +24,6 @@
 #include "util.h"
 #include "exceptions.h"
 #include "types.h"
-#include "argb_image.h"
 #include "certificates.h"
 #include "xyz_image.h"
 #include "dcp_assert.h"
@@ -415,3 +414,16 @@ dcp::private_key_fingerprint (string key)
        char digest_base64[64];
        return Kumu::base64encode (digest, 20, digest_base64, 64);
 }
+
+xmlpp::Node *
+dcp::find_child (xmlpp::Node const * node, string name)
+{
+       xmlpp::Node::NodeList c = node->get_children ();
+       xmlpp::Node::NodeList::iterator i = c.begin();
+       while (i != c.end() && (*i)->get_name() != name) {
+               ++i;
+       }
+
+       DCP_ASSERT (i != c.end ());
+       return *i;
+}