#include "raw_convert.h"
#include <libcxml/cxml.h>
#include <boost/lambda/lambda.hpp>
+#include <boost/make_shared.hpp>
#include <iostream>
#include "i18n.h"
using boost::shared_ptr;
using boost::scoped_array;
using boost::weak_ptr;
+using boost::make_shared;
EncodeServerFinder* EncodeServerFinder::_instance = 0;
void
EncodeServerFinder::start_accept ()
{
- shared_ptr<Socket> socket (new Socket ());
+ shared_ptr<Socket> socket = make_shared<Socket> ();
_listen_acceptor->async_accept (
socket->socket(),
boost::bind (&EncodeServerFinder::handle_accept, this, boost::asio::placeholders::error, socket)
socket->read (reinterpret_cast<uint8_t*> (buffer.get()), length);
string s (buffer.get());
- shared_ptr<cxml::Document> xml (new cxml::Document ("ServerAvailable"));
+ shared_ptr<cxml::Document> xml = make_shared<cxml::Document> ("ServerAvailable");
xml->read_string (s);
string const ip = socket->socket().remote_endpoint().address().to_string ();