From: José Fonseca Date: Sat, 28 May 2011 11:37:02 +0000 (+0100) Subject: Drop dead value unwrap code. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=a6b7956c8356881300e216c75e830b1eb75b6a5a;p=apitrace Drop dead value unwrap code. --- diff --git a/trace_model.cpp b/trace_model.cpp index 03f633b..303e953 100644 --- a/trace_model.cpp +++ b/trace_model.cpp @@ -343,18 +343,10 @@ std::ostream & operator <<(std::ostream &os, Value *value) { } -static inline const Value *unwrap(const Value *node) { - const Enum *c = dynamic_cast(node); - if (c) - return c->sig->second; - return node; -} - - static Null null; const Value & Value::operator[](size_t index) const { - const Array *array = dynamic_cast(unwrap(this)); + const Array *array = dynamic_cast(this); if (array) { if (index < array->values.size()) { return *array->values[index];