From a64c1ec2a50f62d63872eac6bc740966602e87bd Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Sun, 11 Oct 2009 00:01:04 +0000 Subject: Some code cleanup, removed unused functions, changed == empty-list to isNil to avoid unnecessary construction of empty lists, replaced some casts by generic declarations. Added simple maybe, failable and state monad classes to help return optional objects or failures and carry state around. Added utility functions to zip and unzip list. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@823981 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/sca/kernel/value.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'cpp/sca/kernel/value.hpp') diff --git a/cpp/sca/kernel/value.hpp b/cpp/sca/kernel/value.hpp index cf356b8a24..ae4c69aab9 100644 --- a/cpp/sca/kernel/value.hpp +++ b/cpp/sca/kernel/value.hpp @@ -128,43 +128,43 @@ public: } value(const std::string& str) : - type(value::String), data(vdata(unit(str))) { + type(value::String), data(vdata(result(str))) { countValues++; countVValues++; } value(const char* str) : - type(value::Symbol), data(vdata(unit(std::string(str)))) { + type(value::Symbol), data(vdata(result(std::string(str)))) { countValues++; countVValues++; } value(const list& lst) : - type(value::List), data(vdata(unit(lst))) { + type(value::List), data(vdata(result(lst))) { countValues++; countVValues++; } value(const double num) : - type(value::Number), data(vdata(unit(num))) { + type(value::Number), data(vdata(result(num))) { countValues++; countVValues++; } value(const int num) : - type(value::Number), data(vdata(unit((double)num))) { + type(value::Number), data(vdata(result((double)num))) { countValues++; countVValues++; } value(const bool boo) : - type(value::Boolean), data(vdata(unit(boo))) { + type(value::Boolean), data(vdata(result(boo))) { countValues++; countVValues++; } value(const char chr) : - type(value::Character), data(vdata(unit(chr))) { + type(value::Character), data(vdata(result(chr))) { countValues++; countVValues++; } -- cgit v1.2.3