mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-01 21:13:10 +01:00
finally get rid of std::auto_ptr
This commit is contained in:
@@ -48,7 +48,7 @@ public:
|
||||
{
|
||||
Poco::Net::initializeSSL();
|
||||
}
|
||||
|
||||
|
||||
~SSLInitializer()
|
||||
{
|
||||
Poco::Net::uninitializeSSL();
|
||||
@@ -62,7 +62,7 @@ int main(int argc, char** argv)
|
||||
HTTPStreamFactory::registerFactory();
|
||||
HTTPSStreamFactory::registerFactory();
|
||||
FTPStreamFactory::registerFactory();
|
||||
|
||||
|
||||
if (argc != 2)
|
||||
{
|
||||
Path p(argv[0]);
|
||||
@@ -79,11 +79,7 @@ int main(int argc, char** argv)
|
||||
try
|
||||
{
|
||||
URI uri(argv[1]);
|
||||
#ifndef POCO_ENABLE_CPP11
|
||||
std::auto_ptr<std::istream> pStr(URIStreamOpener::defaultOpener().open(uri));
|
||||
#else
|
||||
std::unique_ptr<std::istream> pStr(URIStreamOpener::defaultOpener().open(uri));
|
||||
#endif // POCO_ENABLE_CPP11
|
||||
StreamCopier::copyStream(*pStr.get(), std::cout);
|
||||
}
|
||||
catch (Exception& exc)
|
||||
@@ -91,6 +87,6 @@ int main(int argc, char** argv)
|
||||
std::cerr << exc.displayText() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user