summaryrefslogtreecommitdiff
path: root/src/lib/image_proxy.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-05-25 00:56:44 +0200
committerCarl Hetherington <cth@carlh.net>2021-05-25 21:35:12 +0200
commit5d9ff746138a30c1469b788afe5a4eee25fed368 (patch)
treed81a161e3ca2ce07ab323318504beb641449a02c /src/lib/image_proxy.cc
parent1f30ea2ec7548ccbc639370b2ed0347bef05015b (diff)
C++11 tidying.
Diffstat (limited to 'src/lib/image_proxy.cc')
-rw-r--r--src/lib/image_proxy.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/image_proxy.cc b/src/lib/image_proxy.cc
index f6f6350d8..d81a3ffef 100644
--- a/src/lib/image_proxy.cc
+++ b/src/lib/image_proxy.cc
@@ -18,6 +18,7 @@
*/
+
#include "image_proxy.h"
#include "raw_image_proxy.h"
#include "ffmpeg_image_proxy.h"
@@ -31,19 +32,22 @@
#include "i18n.h"
+
using std::cout;
-using std::string;
+using std::make_shared;
using std::shared_ptr;
+using std::string;
+
shared_ptr<ImageProxy>
image_proxy_factory (shared_ptr<cxml::Node> xml, shared_ptr<Socket> socket)
{
if (xml->string_child("Type") == N_("Raw")) {
- return shared_ptr<ImageProxy> (new RawImageProxy (xml, socket));
+ return make_shared<RawImageProxy>(xml, socket);
} else if (xml->string_child("Type") == N_("FFmpeg")) {
return shared_ptr<FFmpegImageProxy> (new FFmpegImageProxy(xml, socket));
} else if (xml->string_child("Type") == N_("J2K")) {
- return shared_ptr<J2KImageProxy> (new J2KImageProxy (xml, socket));
+ return make_shared<J2KImageProxy>(xml, socket);
}
throw NetworkError (_("Unexpected image type received by server"));