Changed pass-by-value to pass-by-reference.

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@984 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
rich_sposato 2009-02-02 06:23:28 +00:00
parent 2aa35ef4d7
commit 26d771c3a1

View file

@ -76,12 +76,12 @@ namespace Loki
{ {
template <class SomeLhs> template <class SomeLhs>
static ResultType DispatchRhs(SomeLhs& lhs, BaseRhs& rhs, static ResultType DispatchRhs(SomeLhs& lhs, BaseRhs& rhs,
Executor exec, NullType) Executor & exec, NullType)
{ return exec.OnError(lhs, rhs); } { return exec.OnError(lhs, rhs); }
template <class Head, class Tail, class SomeLhs> template <class Head, class Tail, class SomeLhs>
static ResultType DispatchRhs(SomeLhs& lhs, BaseRhs& rhs, static ResultType DispatchRhs(SomeLhs& lhs, BaseRhs& rhs,
Executor exec, Typelist<Head, Tail>) Executor & exec, Typelist<Head, Tail>)
{ {
if (Head* p2 = dynamic_cast<Head*>(&rhs)) if (Head* p2 = dynamic_cast<Head*>(&rhs))
{ {
@ -98,12 +98,12 @@ namespace Loki
} }
static ResultType DispatchLhs(BaseLhs& lhs, BaseRhs& rhs, static ResultType DispatchLhs(BaseLhs& lhs, BaseRhs& rhs,
Executor exec, NullType) Executor & exec, NullType)
{ return exec.OnError(lhs, rhs); } { return exec.OnError(lhs, rhs); }
template <class Head, class Tail> template <class Head, class Tail>
static ResultType DispatchLhs(BaseLhs& lhs, BaseRhs& rhs, static ResultType DispatchLhs(BaseLhs& lhs, BaseRhs& rhs,
Executor exec, Typelist<Head, Tail>) Executor & exec, Typelist<Head, Tail>)
{ {
if (Head* p1 = dynamic_cast<Head*>(&lhs)) if (Head* p1 = dynamic_cast<Head*>(&lhs))
{ {
@ -114,7 +114,7 @@ namespace Loki
public: public:
static ResultType Go(BaseLhs& lhs, BaseRhs& rhs, static ResultType Go(BaseLhs& lhs, BaseRhs& rhs,
Executor exec) Executor & exec)
{ return DispatchLhs(lhs, rhs, exec, TypesLhs()); } { return DispatchLhs(lhs, rhs, exec, TypesLhs()); }
}; };