summaryrefslogtreecommitdiffstats
path: root/cpp/sca/kernel
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2009-10-03 21:50:40 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2009-10-03 21:50:40 +0000
commit3dfdf5ef0405474dbd4084e1aafdc44d9b1d49e4 (patch)
tree14735aa7faf4b848889713fc153382af269a7344 /cpp/sca/kernel
parentb2b06bd2780dc40f666201d095c388313364b37a (diff)
Removed explicit C++ keywords to let the compiler perform the necessary conversions.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@821426 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/sca/kernel')
-rw-r--r--cpp/sca/kernel/function.hpp8
-rw-r--r--cpp/sca/kernel/gc.hpp6
-rw-r--r--cpp/sca/kernel/kernel-test.cpp8
-rw-r--r--cpp/sca/kernel/list.hpp2
-rw-r--r--cpp/sca/kernel/parallel.hpp4
-rw-r--r--cpp/sca/kernel/value.hpp16
-rw-r--r--cpp/sca/kernel/xml.hpp2
7 files changed, 23 insertions, 23 deletions
diff --git a/cpp/sca/kernel/function.hpp b/cpp/sca/kernel/function.hpp
index caba5211b9..07b4111239 100644
--- a/cpp/sca/kernel/function.hpp
+++ b/cpp/sca/kernel/function.hpp
@@ -86,12 +86,12 @@ public:
template<typename F> class Proxy: public Callable {
public:
- explicit Proxy(const F& f) : function(f) {
+ Proxy(const F& f) : function(f) {
countProxies++;
countFProxies ++;
}
- explicit Proxy(const Proxy& p) : function(p.function) {
+ Proxy(const Proxy& p) : function(p.function) {
countProxies++;
countCProxies ++;
}
@@ -123,7 +123,7 @@ public:
countELambdas++;
}
- template<typename F> explicit lambda(const F f) : callable(0) {
+ template<typename F> lambda(const F f) : callable(0) {
typedef typename CallableType::template Proxy<F> ProxyType;
countLambdas++;
@@ -214,7 +214,7 @@ template<typename R, typename T, typename U, typename V, typename... P> const la
*/
template<typename T> class unitReturn {
public:
- explicit unitReturn(const T& v) :
+ unitReturn(const T& v) :
v(v) {
}
const T operator()() const {
diff --git a/cpp/sca/kernel/gc.hpp b/cpp/sca/kernel/gc.hpp
index b0ed42a474..0d292f6194 100644
--- a/cpp/sca/kernel/gc.hpp
+++ b/cpp/sca/kernel/gc.hpp
@@ -33,7 +33,7 @@ namespace tuscany
template<typename T> class gc_ptr {
public:
- explicit gc_ptr(T* p = 0) throw() : countingRef(p == 0? 0 : new CountingRef(p)) {
+ gc_ptr(T* p = 0) throw() : countingRef(p == 0? 0 : new CountingRef(p)) {
}
~gc_ptr() throw() {
@@ -116,7 +116,7 @@ template<typename T> std::ostream& operator<<(std::ostream& out, const gc_ptr<T>
*/
template<typename T> class gc_aptr {
public:
- explicit gc_aptr(T* p = 0) throw() : countingRef(p == 0? 0 : new CountingRef(p)) {
+ gc_aptr(T* p = 0) throw() : countingRef(p == 0? 0 : new CountingRef(p)) {
}
~gc_aptr() throw() {
@@ -199,7 +199,7 @@ template<typename T> std::ostream& operator<<(std::ostream& out, const gc_aptr<T
*/
template<typename T> class gc_counting_ptr {
public:
- explicit gc_counting_ptr(T* p = 0) throw() : ptr(p) {
+ gc_counting_ptr(T* p = 0) throw() : ptr(p) {
acquire(p);
}
diff --git a/cpp/sca/kernel/kernel-test.cpp b/cpp/sca/kernel/kernel-test.cpp
index 02bb63c928..fb3f540abd 100644
--- a/cpp/sca/kernel/kernel-test.cpp
+++ b/cpp/sca/kernel/kernel-test.cpp
@@ -248,7 +248,7 @@ bool testSeq() {
}
value valueSquare(list<value> x) {
- return value((int)car(x) * (int)car(x));
+ return (int)car(x) * (int)car(x);
}
bool testValue() {
@@ -257,7 +257,7 @@ bool testValue() {
assert(value("abcd") == value("abcd"));
lambda<value(list<value>&)> vl(valueSquare);
assert(value(vl) == value(vl));
- assert(value(makeList(value(1), value(2))) == value(makeList(value(1), value(2))));
+ assert(value(makeList<value>(1, 2)) == value(makeList<value>(1, 2)));
return true;
}
@@ -390,7 +390,7 @@ const bool isName(const value& token) {
bool testReadXML() {
std::istringstream is(currencyXML);
- const list<value> currency = value(readXML(is));
+ const list<value> currency = readXML(is);
const value composite = car(currency);
assert(isElement(composite));
@@ -403,7 +403,7 @@ bool testReadXML() {
bool testWriteXML() {
std::istringstream is(currencyXML);
- const list<value> currency = value(readXML(is));
+ const list<value> currency = readXML(is);
std::ostringstream os;
writeXML(currency, os);
assert(os.str() == currencyXML);
diff --git a/cpp/sca/kernel/list.hpp b/cpp/sca/kernel/list.hpp
index 5ee527e10c..4047e91c1b 100644
--- a/cpp/sca/kernel/list.hpp
+++ b/cpp/sca/kernel/list.hpp
@@ -269,7 +269,7 @@ template<typename T, typename R> const list<R> map(const lambda<R(T)>& f, const
*/
template<typename T, typename R> struct reduceAccumulate {
const lambda<R(R, T)> f;
- explicit reduceAccumulate(const lambda<R(R, T)>& f) :
+ reduceAccumulate(const lambda<R(R, T)>& f) :
f(f) {
}
R operator()(const R& acc, const list<T>& p) const {
diff --git a/cpp/sca/kernel/parallel.hpp b/cpp/sca/kernel/parallel.hpp
index c0d578e281..82983d9edc 100644
--- a/cpp/sca/kernel/parallel.hpp
+++ b/cpp/sca/kernel/parallel.hpp
@@ -139,7 +139,7 @@ public:
*/
template<typename T> class queue {
public:
- explicit queue(int max) : max(max), size(0), tail(0), head(0), values(new T[max]) {
+ queue(int max) : max(max), size(0), tail(0), head(0), values(new T[max]) {
pthread_mutex_init(&mutex, NULL);
pthread_cond_init(&full, NULL);
pthread_cond_init(&empty, NULL);
@@ -221,7 +221,7 @@ const list<pthread_t> makeWorkerThreads(queue<lambda<bool()> >& queue, const int
*/
class worker {
public:
- explicit worker(int max) : work(queue<lambda<bool()> >(max)), threads(makeWorkerThreads(work, max)) {
+ worker(int max) : work(queue<lambda<bool()> >(max)), threads(makeWorkerThreads(work, max)) {
}
private:
diff --git a/cpp/sca/kernel/value.hpp b/cpp/sca/kernel/value.hpp
index ca4bd06ca6..184773baec 100644
--- a/cpp/sca/kernel/value.hpp
+++ b/cpp/sca/kernel/value.hpp
@@ -121,49 +121,49 @@ public:
countValues--;
}
- explicit value(const lambda<value(list<value>&)>& func) :
+ value(const lambda<value(list<value>&)>& func) :
type(value::Lambda), data(vdata(func)) {
countValues++;
countVValues++;
}
- explicit value(const std::string& str) :
+ value(const std::string& str) :
type(value::String), data(vdata(unit(str))) {
countValues++;
countVValues++;
}
- explicit value(const char* str) :
+ value(const char* str) :
type(value::Symbol), data(vdata(unit(std::string(str)))) {
countValues++;
countVValues++;
}
- explicit value(const list<value>& lst) :
+ value(const list<value>& lst) :
type(value::List), data(vdata(unit(lst))) {
countValues++;
countVValues++;
}
- explicit value(const double num) :
+ value(const double num) :
type(value::Number), data(vdata(unit(num))) {
countValues++;
countVValues++;
}
- explicit value(const int num) :
+ value(const int num) :
type(value::Number), data(vdata(unit((double)num))) {
countValues++;
countVValues++;
}
- explicit value(const bool boo) :
+ value(const bool boo) :
type(value::Boolean), data(vdata(unit(boo))) {
countValues++;
countVValues++;
}
- explicit value(const char chr) :
+ value(const char chr) :
type(value::Character), data(vdata(unit(chr))) {
countValues++;
countVValues++;
diff --git a/cpp/sca/kernel/xml.hpp b/cpp/sca/kernel/xml.hpp
index b4a3b87ad1..0065b23268 100644
--- a/cpp/sca/kernel/xml.hpp
+++ b/cpp/sca/kernel/xml.hpp
@@ -46,7 +46,7 @@ public:
None = 0, Element = 1, Attribute = 2, EndElement = 15, Identifier = 100, Text = 101, End = 103
};
- explicit XmlReader(xmlTextReaderPtr xml) : xml(xml), tokenType(None) {
+ XmlReader(xmlTextReaderPtr xml) : xml(xml), tokenType(None) {
xmlTextReaderSetParserProp(xml, XML_PARSER_DEFAULTATTRS, 1);
xmlTextReaderSetParserProp(xml, XML_PARSER_SUBST_ENTITIES, 1);
}