aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Amado <kamadorueda@gmail.com>2022-01-21 10:04:09 -0500
committerKevin Amado <kamadorueda@gmail.com>2022-01-21 16:32:43 -0500
commit1472e045a757af4e289801673b456b78ebf18933 (patch)
tree7be6569b2135232301f276e73f70dd420ac6472a
parent49b0bb020663b7283549754a826b1346c93a8bbb (diff)
avoid unnecesary calls
-rw-r--r--src/libexpr/eval-inline.hh16
-rw-r--r--src/libexpr/eval.hh2
2 files changed, 0 insertions, 18 deletions
diff --git a/src/libexpr/eval-inline.hh b/src/libexpr/eval-inline.hh
index cd58315ba..08acb0877 100644
--- a/src/libexpr/eval-inline.hh
+++ b/src/libexpr/eval-inline.hh
@@ -51,14 +51,6 @@ void EvalState::forceValue(Value & v, const Pos & pos)
}
-inline void EvalState::forceAttrs(Value & v)
-{
- forceValue(v, v.determinePos(noPos));
- if (v.type() != nAttrs)
- throwTypeError("value is %1% while a set was expected", v);
-}
-
-
inline void EvalState::forceAttrs(Value & v, const Pos & pos)
{
forceValue(v, pos);
@@ -67,14 +59,6 @@ inline void EvalState::forceAttrs(Value & v, const Pos & pos)
}
-inline void EvalState::forceList(Value & v)
-{
- forceValue(v, v.determinePos(noPos));
- if (!v.isList())
- throwTypeError("value is %1% while a list was expected", v);
-}
-
-
inline void EvalState::forceList(Value & v, const Pos & pos)
{
forceValue(v, pos);
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh
index f0b94f440..11d62ba04 100644
--- a/src/libexpr/eval.hh
+++ b/src/libexpr/eval.hh
@@ -231,9 +231,7 @@ public:
NixInt forceInt(Value & v, const Pos & pos);
NixFloat forceFloat(Value & v, const Pos & pos);
bool forceBool(Value & v, const Pos & pos);
- inline void forceAttrs(Value & v);
inline void forceAttrs(Value & v, const Pos & pos);
- inline void forceList(Value & v);
inline void forceList(Value & v, const Pos & pos);
void forceFunction(Value & v, const Pos & pos); // either lambda or primop
string forceString(Value & v, const Pos & pos = noPos);