Added default constructor, which simplifies usage of this object.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11482 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -65,9 +65,7 @@ INetworkHttp *network_http = NULL;
|
||||
* since the user might trigger another save in the menu (potentially
|
||||
* ending up with an corrupted file).
|
||||
*/
|
||||
NetworkHttp::NetworkHttp() : m_all_requests(std::priority_queue<Request*,
|
||||
std::vector<Request*>,
|
||||
Request::Compare>()),
|
||||
NetworkHttp::NetworkHttp() :
|
||||
m_current_request(NULL),
|
||||
m_abort(false),
|
||||
m_thread_id(NULL)
|
||||
|
||||
@@ -33,6 +33,14 @@ private:
|
||||
/** The actual data to be used. */
|
||||
TYPE m_data;
|
||||
public:
|
||||
// ------------------------------------------------------------------------
|
||||
/** Initialise the data and the mutex with default constructors. */
|
||||
Synchronised() : m_data(TYPE())
|
||||
{
|
||||
pthread_mutex_init(&m_mutex, NULL);
|
||||
} // Synchronised()
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
/** Initialise the data and the mutex. */
|
||||
Synchronised(const TYPE &v)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user