From ea71f958f4a33d4dd00f406bef06b80143b93c9f Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Sat, 26 May 2012 18:01:04 +1000 Subject: [PATCH] Instancing and construction fixups for clang --- extent.cpp | 8 +++++--- ip.cpp.rl | 10 +++++++--- signal.hpp | 8 ++++---- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/extent.cpp b/extent.cpp index db5cd43b..cc3bb28a 100644 --- a/extent.cpp +++ b/extent.cpp @@ -79,7 +79,9 @@ namespace util { { return; } } -template struct extent; -template struct extent; -template struct extent; +namespace util { + template struct extent; + template struct extent; + template struct extent; +} diff --git a/ip.cpp.rl b/ip.cpp.rl index 451ab047..1f273665 100644 --- a/ip.cpp.rl +++ b/ip.cpp.rl @@ -40,9 +40,13 @@ ipv4::ip::ip (uint32_t _integer): { ; } -ipv4::ip::ip (uint8_t a, uint8_t b, uint8_t c, uint8_t d): - m_octets ({ a, b, c, d }) -{ ; } +ipv4::ip::ip (uint8_t a, uint8_t b, uint8_t c, uint8_t d) +{ + m_octets[0] = a; + m_octets[1] = b; + m_octets[2] = c; + m_octets[3] = d; +} ipv4::ip& diff --git a/signal.hpp b/signal.hpp index 4d47fdd4..e4deb16b 100644 --- a/signal.hpp +++ b/signal.hpp @@ -31,7 +31,7 @@ namespace util { template class signal { public: - typedef Ret (*callback_function)(Args...); + //typedef Ret (*callback_function)(Args...); typedef std::function callback_object; protected: @@ -81,9 +81,9 @@ namespace util { /// Add a callback to the list. - const cookie - connect (const callback_function &_cb) - { return m_children.insert (m_children.end (), _cb); } + //const cookie + //connect (const callback_function &_cb) + // { return m_children.insert (m_children.end (), _cb); } void disconnect (const cookie _cb)