Skip to content
Snippets Groups Projects
Commit 379c49fc authored by Rider Linden's avatar Rider Linden
Browse files

Scratch the unique_ptr for the moment.

parent e7a1e619
No related branches found
No related tags found
No related merge requests found
...@@ -188,7 +188,6 @@ ...@@ -188,7 +188,6 @@
/// ///
#include "linden_common.h" // Modifies curl/curl.h interfaces #include "linden_common.h" // Modifies curl/curl.h interfaces
#include <string> #include <string>
namespace LLCore namespace LLCore
...@@ -292,24 +291,29 @@ struct HttpStatus ...@@ -292,24 +291,29 @@ struct HttpStatus
HttpStatus() HttpStatus()
{ {
mDetails = std::unique_ptr<Details>(new Details(LLCORE, HE_SUCCESS)); mDetails = new Details(LLCORE, HE_SUCCESS);
} }
HttpStatus(type_enum_t type, short status) HttpStatus(type_enum_t type, short status)
{ {
mDetails = std::unique_ptr<Details>(new Details(type, status)); mDetails = new Details(type, status);
} }
HttpStatus(int http_status) HttpStatus(int http_status)
{ {
mDetails = std::unique_ptr<Details>(new Details(http_status, mDetails = new Details(http_status,
(http_status >= 200 && http_status <= 299) ? HE_SUCCESS : HE_REPLY_ERROR)); (http_status >= 200 && http_status <= 299) ? HE_SUCCESS : HE_REPLY_ERROR);
llassert(http_status >= 100 && http_status <= 999); llassert(http_status >= 100 && http_status <= 999);
} }
HttpStatus(const HttpStatus & rhs) HttpStatus(const HttpStatus & rhs)
{ {
mDetails = std::unique_ptr<Details>(new Details(*rhs.mDetails)); mDetails = new Details(*rhs.mDetails);
}
~HttpStatus()
{
delete mDetails;
} }
HttpStatus & operator=(const HttpStatus & rhs) HttpStatus & operator=(const HttpStatus & rhs)
...@@ -468,7 +472,8 @@ struct HttpStatus ...@@ -468,7 +472,8 @@ struct HttpStatus
void * mErrorData; void * mErrorData;
}; };
std::unique_ptr<Details> mDetails; //boost::unique_ptr<Details> mDetails;
Details * mDetails;
}; // end struct HttpStatus }; // end struct HttpStatus
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment