diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-24 20:25:49 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-24 20:25:49 -0400 |
commit | 6d880c27286bf63452cf14b8a0bf49386269f0b2 (patch) | |
tree | 5e42f18c1ab560f303a704076b8216d2c562e71e /src/scope.h | |
parent | 45da776f96417ed28b27278799bc81d2cb7d6199 (diff) | |
download | fork-ledger-6d880c27286bf63452cf14b8a0bf49386269f0b2.tar.gz fork-ledger-6d880c27286bf63452cf14b8a0bf49386269f0b2.tar.bz2 fork-ledger-6d880c27286bf63452cf14b8a0bf49386269f0b2.zip |
Removed some dead code
Diffstat (limited to 'src/scope.h')
-rw-r--r-- | src/scope.h | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/src/scope.h b/src/scope.h index 1cc2858e..2722b041 100644 --- a/src/scope.h +++ b/src/scope.h @@ -68,14 +68,6 @@ public: virtual void define(const string&, expr_t::ptr_op_t) {} virtual expr_t::ptr_op_t lookup(const string& name) = 0; - - value_t resolve(const string& name) { - expr_t::ptr_op_t definition = lookup(name); - if (definition) - return definition->calc(*this); - else - return NULL_VALUE; - } }; /** @@ -258,36 +250,6 @@ inline T& find_scope(child_scope_t& scope, bool skip_this = true) return reinterpret_cast<T&>(scope); // never executed } -/** - * @brief Brief - * - * Long. - */ -template <typename T> -class ptr_t : public noncopyable -{ - T * value; - - ptr_t(); - -public: - ptr_t(scope_t& scope, const string& name) - : value(scope.resolve(name).template as_pointer<T>()) { - TRACE_CTOR(ptr_t, "scope_t&, const string&"); - } - ptr_t(call_scope_t& scope, const std::size_t idx) - : value(scope[idx].template as_pointer<T>()) { - TRACE_CTOR(ptr_t, "call_scope_t&, const std::size_t"); - } - ~ptr_t() throw() { - TRACE_DTOR(ptr_t); - } - - T& operator *() { return *value; } - T * operator->() { return value; } -}; - } // namespace ledger #endif // _SCOPE_H - |