remove unecessary copy constructors also here

refactor-result-recursion
Roker 7 years ago
parent 4382fd6fc0
commit f23706cf31

@ -40,11 +40,7 @@ In<std::size_t>::~In()
{ \
delete value; \
} \
\
template<> \
Out< TYPE >::Out(const Out<TYPE>& other) \
: value ( new TYPE {*other.value} ) \
{ }
SIMPLE_TYPE_OUT( bool )
SIMPLE_TYPE_OUT( unsigned )
@ -76,21 +72,6 @@ Out<char*>::~Out()
template<>
Out<char const*>::Out(const Out<const char*>& other)
: value( new const char* )
{
*value = *other.value ? strdup(*other.value) : nullptr;
}
template<>
Out<char*>::Out(const Out<char*>& other)
: value( new char* )
{
*value = *other.value ? strdup(*other.value) : nullptr;
}
template<>
int from_json<int>(const js::Value& v)
{

@ -42,8 +42,7 @@ struct In
// default implementation:
In(const js::Value& v, const js::Array& params, unsigned position)
: In( from_json<T>(v) )
{
}
{ }
T value;
};
@ -66,8 +65,7 @@ struct InRaw
// default implementation:
InRaw(const js::Value& v, const js::Array& params, unsigned position)
: InRaw(v)
{
}
{ }
js::Value value;
};
@ -88,8 +86,7 @@ struct InOut : public In<T>
// default implementation:
InOut(const js::Value& v, const js::Array& params, unsigned position)
: Base( from_json<T>(v) )
{
}
{ }
js::Value to_json() const
{
@ -123,8 +120,7 @@ struct Out
Out(const js::Value& v, const js::Array& params, unsigned position)
: Out()
{
}
{ }
js::Value to_json() const
{

Loading…
Cancel
Save