Clean up core module for building with Clang
This means removing unused private variables in random-variable-stream.{cc,h} and system-thread.h and fixing removing bad static_casts in calendar-scheduler.cc.
--- a/src/core/model/calendar-scheduler.cc Fri Jul 05 13:20:20 2013 +0200
+++ b/src/core/model/calendar-scheduler.cc Fri Jul 05 14:35:20 2013 +0200
@@ -131,7 +131,11 @@
NS_ASSERT (!IsEmpty ());
uint32_t i = m_lastBucket;
uint64_t bucketTop = m_bucketTop;
- Scheduler::Event minEvent = { static_cast<uint64_t>(0), { static_cast<uint32_t>(~0), static_cast<uint32_t>(~0)}};
+ Scheduler::Event minEvent;
+ minEvent.impl = 0;
+ minEvent.key.m_ts = ~0;
+ minEvent.key.m_uid = ~0;
+ minEvent.key.m_context = 0;
do
{
if (!m_buckets[i].empty ())
--- a/src/core/model/random-variable-stream.cc Fri Jul 05 13:20:20 2013 +0200
+++ b/src/core/model/random-variable-stream.cc Fri Jul 05 14:35:20 2013 +0200
@@ -1170,8 +1170,6 @@
return tid;
}
TriangularRandomVariable::TriangularRandomVariable ()
- :
- m_mode (0.5)
{
// m_mean, m_min, and m_max are initialized after constructor by
// attributes
--- a/src/core/model/random-variable-stream.h Fri Jul 05 13:20:20 2013 +0200
+++ b/src/core/model/random-variable-stream.h Fri Jul 05 14:35:20 2013 +0200
@@ -1982,10 +1982,6 @@
/// The upper bound on values that can be returned by this RNG stream.
double m_max;
-
- /// It's easier to work with the mode internally instead of the
- /// mean. They are related by the simple: mean = (min+max+mode)/3.
- double m_mode;
};
/**
--- a/src/core/model/system-thread.h Fri Jul 05 13:20:20 2013 +0200
+++ b/src/core/model/system-thread.h Fri Jul 05 14:35:20 2013 +0200
@@ -148,7 +148,6 @@
Callback<void> m_callback;
pthread_t m_thread;
- void * m_ret;
#endif
};