[asterisk-scf-commits] asterisk-scf/release/slice-plugins.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Thu Jun 23 15:21:52 CDT 2011
branch "master" has been updated
via 5a2010bc3a7008c761346f1cc3c6cc4f0bb65594 (commit)
via 20f2e7aba90cbe19de308db275989538ae8f5080 (commit)
from 74f375f081b25c02e8df68dbb319f83439c2c0a8 (commit)
Summary of changes:
src/SliceClassMemberDefault.cpp | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 5a2010bc3a7008c761346f1cc3c6cc4f0bb65594
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Wed Jun 22 13:40:29 2011 -0500
Generate floating point default values properly.
diff --git a/src/SliceClassMemberDefault.cpp b/src/SliceClassMemberDefault.cpp
index 92301b1..a2feaca 100644
--- a/src/SliceClassMemberDefault.cpp
+++ b/src/SliceClassMemberDefault.cpp
@@ -43,9 +43,11 @@ ClassMemberDefaultVisitor::visitDataMember(const DataMemberPtr& p)
case Builtin::KindShort:
case Builtin::KindInt:
case Builtin::KindLong:
+ p->setDefaultValue(builtin, "0");
+ break;
case Builtin::KindFloat:
case Builtin::KindDouble:
- p->setDefaultValue(builtin, "0");
+ p->setDefaultValue(builtin, "0.0");
break;
case Builtin::KindBool:
p->setDefaultValue(builtin, "false");
commit 20f2e7aba90cbe19de308db275989538ae8f5080
Author: Kevin P. Fleming <kpfleming at digium.com>
Date: Wed Jun 22 07:36:51 2011 -0500
Update for Ice 3.4.2 default value handling.
diff --git a/src/SliceClassMemberDefault.cpp b/src/SliceClassMemberDefault.cpp
index 69c0785..92301b1 100644
--- a/src/SliceClassMemberDefault.cpp
+++ b/src/SliceClassMemberDefault.cpp
@@ -29,7 +29,7 @@ public:
void
ClassMemberDefaultVisitor::visitDataMember(const DataMemberPtr& p)
{
- if(p->hasDefaultValue())
+ if(p->defaultValueType())
{
return;
}
@@ -45,10 +45,10 @@ ClassMemberDefaultVisitor::visitDataMember(const DataMemberPtr& p)
case Builtin::KindLong:
case Builtin::KindFloat:
case Builtin::KindDouble:
- p->setDefaultValue("0");
+ p->setDefaultValue(builtin, "0");
break;
case Builtin::KindBool:
- p->setDefaultValue("false");
+ p->setDefaultValue(builtin, "false");
break;
default:
break;
@@ -61,7 +61,7 @@ ClassMemberDefaultVisitor::visitDataMember(const DataMemberPtr& p)
if(enumtype)
{
EnumeratorPtr enumerator = enumtype->getEnumerators().front();
- p->setDefaultValue(enumerator->name());
+ p->setDefaultValue(enumtype, enumerator->name());
return;
}
}
-----------------------------------------------------------------------
--
asterisk-scf/release/slice-plugins.git
More information about the asterisk-scf-commits
mailing list