[Zrouter-src] ZRouter.org: push to zconf++ zconf++/model.cc

zrouter-src at zrouter.org zrouter-src at zrouter.org
Tue Jan 24 07:48:43 UTC 2012


details:   /rev/5d681bc34ef6
changeset: 53:5d681bc34ef6
user:      "Nicolai Petri <nicolai at petri.dk>"
date:      Tue Jan 24 08:47:53 2012 +0100
description:
Fix containsValue so it works on enum leafs too.

diffstat:

 zconf++/model.cc |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 4b22729e2798 -r 5d681bc34ef6 zconf++/model.cc
--- a/zconf++/model.cc	Mon Jan 23 21:32:52 2012 +0100
+++ b/zconf++/model.cc	Tue Jan 24 08:47:53 2012 +0100
@@ -182,7 +182,7 @@
 			bool Leaf::containsValue(const int p_value) {
 				check_type_const(array_leaf); // FIXME: We should support objects too
 				BOOST_FOREACH( LeafRef L, m_array ) {
-					if (L.m_type == numeric_leaf && L.get_int() == p_value) 
+					if ((L.m_type == numeric_leaf || L.m_type == enum_leaf) && L.get_int() == p_value) 
 						return true;
 				}
 				return false;


More information about the Zrouter-src mailing list