Commit daa3e183 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum

[CHANGE] - removed MSVC specific code. Please avoid all those #ifndef _MSC_VER...

[CHANGE] - removed MSVC specific code. Please avoid all those #ifndef _MSC_VER stuff. It makes code unreadable and unmaintainable.
parent 85864aae
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
#include <string> #include <string>
#include <cstdlib>
#include <iostream> #include <iostream>
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
...@@ -128,13 +129,8 @@ void WQtNetworkEditor::addModule( boost::shared_ptr< WModule > module ) ...@@ -128,13 +129,8 @@ void WQtNetworkEditor::addModule( boost::shared_ptr< WModule > module )
// set the object at a random start position // set the object at a random start position
time( &m_time ); time( &m_time );
#ifndef _MSC_VER netItem->setPos( ( std::rand() + m_time ) % 200,
netItem->setPos( rand_r( ( unsigned int * ) &m_time ) % 200, ( std::rand() + m_time ) % 200 );
rand_r( ( unsigned int * ) &m_time ) % 200 );
#else
netItem->setPos( ( rand() + m_time ) % 200,
( rand() + m_time ) % 200 );
#endif
m_scene->addItem( netItem ); m_scene->addItem( netItem );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment