X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=input.cpp;h=dba6cf38b26b3ca87a6a953c8842600012e0124b;hb=18a554f90798ccc30999e387054a4a6fcc75a7ce;hp=25012a6bbad930f63a53914ed53fd0e9d8cc4fcf;hpb=6544fa0ec3f3a501bcb89ea977756911bd7f3ebd;p=cubemap diff --git a/input.cpp b/input.cpp index 25012a6..dba6cf3 100644 --- a/input.cpp +++ b/input.cpp @@ -98,25 +98,23 @@ Input *create_input(const string &url, Input::Encoding encoding) { string protocol, user, host, port, path; if (!parse_url(url, &protocol, &user, &host, &port, &path)) { - return NULL; + return nullptr; } if (protocol == "http") { return new HTTPInput(url, encoding); } if (protocol == "udp") { - if (encoding == Input::INPUT_ENCODING_METACUBE) { - return NULL; - } + assert(encoding == Input::INPUT_ENCODING_RAW); return new UDPInput(url); } - return NULL; + return nullptr; } Input *create_input(const InputProto &serialized) { string protocol, user, host, port, path; if (!parse_url(serialized.url(), &protocol, &user, &host, &port, &path)) { - return NULL; + return nullptr; } if (protocol == "http") { return new HTTPInput(serialized); @@ -124,7 +122,7 @@ Input *create_input(const InputProto &serialized) if (protocol == "udp") { return new UDPInput(serialized); } - return NULL; + return nullptr; } Input::~Input() {}