From c98c3e5d14fd1cda4c4ba7a6344c9916ae43a78c Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 10 Sep 2014 16:02:59 +0200 Subject: [PATCH] vhdlpp: Inlined a few functions. --- vhdlpp/vtype.cc | 9 --------- vhdlpp/vtype.h | 7 ++++--- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/vhdlpp/vtype.cc b/vhdlpp/vtype.cc index 199d06fd7..07dfc7e28 100644 --- a/vhdlpp/vtype.cc +++ b/vhdlpp/vtype.cc @@ -98,15 +98,6 @@ VTypeArray::~VTypeArray() { } -size_t VTypeArray::dimensions() const -{ - return ranges_.size(); -} - -const VType* VTypeArray::element_type() const -{ - return etype_; -} void VTypeArray::show(ostream&out) const { diff --git a/vhdlpp/vtype.h b/vhdlpp/vtype.h index b0e540062..bfaae2f61 100644 --- a/vhdlpp/vtype.h +++ b/vhdlpp/vtype.h @@ -197,13 +197,14 @@ class VTypeArray : public VType { void write_to_stream(std::ostream&fd) const; void show(std::ostream&) const; - size_t dimensions() const; + inline size_t dimensions() const { return ranges_.size(); }; const range_t&dimension(size_t idx) const { return ranges_[idx]; } - bool signed_vector() const { return signed_flag_; } + inline bool signed_vector() const { return signed_flag_; } - const VType* element_type() const; + // returns the type of element held in the array + inline const VType* element_type() const { return etype_; } int emit_def(std::ostream&out, perm_string name) const; int emit_typedef(std::ostream&out, typedef_context_t&ctx) const;