summaryrefslogtreecommitdiff
path: root/src/lib/server.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-08-17 21:47:08 +0100
committerCarl Hetherington <cth@carlh.net>2013-08-17 21:47:08 +0100
commit2499c41097f8410cb3016e095a85d68979485a7b (patch)
tree331a23489d3be42ede2861311a797792ba663805 /src/lib/server.cc
parent89af81886eeee57861bc23984a0583bec76d536d (diff)
Various bits mostly related to colour conversions.
Diffstat (limited to 'src/lib/server.cc')
-rw-r--r--src/lib/server.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/server.cc b/src/lib/server.cc
index 54cffc077..de265dca4 100644
--- a/src/lib/server.cc
+++ b/src/lib/server.cc
@@ -49,6 +49,7 @@ using boost::algorithm::split;
using boost::thread;
using boost::bind;
using boost::scoped_array;
+using boost::optional;
using libdcp::Size;
ServerDescription::ServerDescription (shared_ptr<const cxml::Node> node)
@@ -68,17 +69,17 @@ ServerDescription::as_xml (xmlpp::Node* root) const
* @param v Metadata.
* @return ServerDescription, or 0.
*/
-shared_ptr<ServerDescription>
+optional<ServerDescription>
ServerDescription::create_from_metadata (string v)
{
vector<string> b;
split (b, v, is_any_of (N_(" ")));
if (b.size() != 2) {
- return shared_ptr<ServerDescription> ();
+ return optional<ServerDescription> ();
}
- return shared_ptr<ServerDescription> (new ServerDescription (b[0], atoi (b[1].c_str ())));
+ return ServerDescription (b[0], atoi (b[1].c_str ()));
}
Server::Server (shared_ptr<Log> log)