Index: src/compiler/node.h |
diff --git a/src/compiler/node.h b/src/compiler/node.h |
index a0974521b8cdaac55f48adee5853657c51cdbe6a..714a27b867f0c7e276bad902fb148d59088a7158 100644 |
--- a/src/compiler/node.h |
+++ b/src/compiler/node.h |
@@ -77,10 +77,17 @@ typedef NodeVectorVector::reverse_iterator NodeVectorVectorRIter; |
typedef Node::Uses::iterator UseIter; |
typedef Node::Inputs::iterator InputIter; |
+// Helper to extract parameters from Operator1<*> operator. |
+template <typename T> |
+static inline T OpParameter(Operator* op) { |
+ return reinterpret_cast<Operator1<T>*>(op)->parameter(); |
+} |
+ |
+ |
// Helper to extract parameters from Operator1<*> nodes. |
template <typename T> |
static inline T OpParameter(Node* node) { |
- return reinterpret_cast<Operator1<T>*>(node->op())->parameter(); |
+ return OpParameter<T>(node->op()); |
} |
} |
} |