From 4badd7ed17b4628d3a8d96e21c900aa91004daaf Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 7 Nov 2013 12:44:14 +0000 Subject: Get rid of an intermediary on the stack --- src/libexpr/eval-inline.hh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libexpr/eval-inline.hh') diff --git a/src/libexpr/eval-inline.hh b/src/libexpr/eval-inline.hh index ec0206eb01a7..5801a20c3b10 100644 --- a/src/libexpr/eval-inline.hh +++ b/src/libexpr/eval-inline.hh @@ -12,9 +12,9 @@ LocalNoInlineNoReturn(void throwEvalError(const char * s)) throw EvalError(s); } -LocalNoInlineNoReturn(void throwTypeError(const char * s, const string & s2)) +LocalNoInlineNoReturn(void throwTypeError(const char * s, const Value & v)) { - throw TypeError(format(s) % s2); + throw TypeError(format(s) % showType(v)); } @@ -45,7 +45,7 @@ inline void EvalState::forceAttrs(Value & v) { forceValue(v); if (v.type != tAttrs) - throwTypeError("value is %1% while a set was expected", showType(v)); + throwTypeError("value is %1% while a set was expected", v); } @@ -53,7 +53,7 @@ inline void EvalState::forceList(Value & v) { forceValue(v); if (v.type != tList) - throwTypeError("value is %1% while a list was expected", showType(v)); + throwTypeError("value is %1% while a list was expected", v); } } -- cgit 1.4.1