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:
hikerstk
2012-08-07 01:35:41 +00:00
parent 43359f9292
commit f63011d003
2 changed files with 9 additions and 3 deletions

View File

@@ -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)

View File

@@ -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)
{