Browse Source

for Roker: using std::unique_ptr ;-)

pull/1/head
Volker Birk 2 years ago
parent
commit
7c7f53be0d
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      test_webserver.cc

+ 4
- 4
test_webserver.cc View File

@ -6,9 +6,10 @@
int main()
{
unsigned short port;
auto web =
pEp::Webserver::probing_port_range(pEp::net::ip::address::from_string("127.0.0.1"),
8080, 8089, port, "htdocs");
std::unique_ptr<pEp::Webserver> web(
pEp::Webserver::probing_port_range(pEp::net::ip::address::from_string("127.0.0.1"),
8080, 8089, port, "htdocs")
);
if (!web) {
std::cerr << "cannot start webserver, no ports free\n";
return 1;
@ -50,7 +51,6 @@ int main()
);
web->run();
delete web;
return 0;
}


Loading…
Cancel
Save