[Zrouter-src] ZRouter.org: push to zconf++ boost_user_config.hpp zconf++/boost...

zrouter-src at zrouter.org zrouter-src at zrouter.org
Thu Jan 12 18:57:03 UTC 2012


details:   /rev/69aa52291877
changeset: 39:69aa52291877
user:      "Nicolai Petri <nicolai at petri.dk>"
date:      Thu Jan 12 19:46:57 2012 +0100
description:
Make compile with clang again.
Add contains(idx|key) methods to Leaf class.

diffstat:

 boost_user_config.hpp |  2 +-
 zconf++/boost.cc      |  2 ++
 zconf++/model.h       |  8 ++++++++
 3 files changed, 11 insertions(+), 1 deletions(-)

diffs (43 lines):

diff -r bc7e5c46eec7 -r 69aa52291877 boost_user_config.hpp
--- a/boost_user_config.hpp	Wed Jan 11 07:34:43 2012 +0100
+++ b/boost_user_config.hpp	Thu Jan 12 19:46:57 2012 +0100
@@ -93,7 +93,7 @@
 #define BOOST_ASIO_SEPARATE_COMPILATION
 #define BOOST_SYSTEM_SEPARATE_COMPILATION
 
-#define NO_BOOST_DATE_TIME_INLINE
+// #define NO_BOOST_DATE_TIME_INLINE
  
 // BOOST_WHATEVER_DYN_LINK: Forces library "whatever" to be linked as a dll 
 // rather than a static library on Microsoft Windows: replace the WHATEVER 
diff -r bc7e5c46eec7 -r 69aa52291877 zconf++/boost.cc
--- a/zconf++/boost.cc	Wed Jan 11 07:34:43 2012 +0100
+++ b/zconf++/boost.cc	Thu Jan 12 19:46:57 2012 +0100
@@ -1,7 +1,9 @@
 #include <boost/config.hpp>
 #include <boost/asio/impl/src.hpp>
+#ifdef OPT_BOOST_TIME_INLINE
 #include <boost/date_time/posix_time/posix_time.hpp>
 //#undef NO_BOOST_DATE_TIME_INLINE
 #include <boost/date_time/gregorian_calendar.hpp>
 #define BOOST_DATE_TIME_INLINE
 #include <boost/date_time/gregorian_calendar.ipp>
+#endif // OPT_BOOST_TIME_INLINE
diff -r bc7e5c46eec7 -r 69aa52291877 zconf++/model.h
--- a/zconf++/model.h	Wed Jan 11 07:34:43 2012 +0100
+++ b/zconf++/model.h	Thu Jan 12 19:46:57 2012 +0100
@@ -209,6 +209,14 @@
 			{
 				return m_type;
 			}
+			bool contains(const std::string p_key) {
+				check_type_const(object_leaf);
+				return (m_map.find(p_key) != m_map.end());
+			}
+			bool contains(const int p_idx) {
+				check_type_const(array_leaf);
+				return (p_idx < m_array.size());
+			}
 			LeafRef parent() const
 			{
 				return *m_parent;


More information about the Zrouter-src mailing list