From 11e6440162c5619a1c18ef7c38268070f8ada6c4 Mon Sep 17 00:00:00 2001 From: steve Date: Wed, 15 Nov 2000 20:31:05 +0000 Subject: [PATCH] Fix warning about temporaries. --- Module.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Module.cc b/Module.cc index 67878013b..7b9b3e69b 100644 --- a/Module.cc +++ b/Module.cc @@ -17,7 +17,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #if !defined(WINNT) && !defined(macintosh) -#ident "$Id: Module.cc,v 1.13 2000/11/05 06:05:59 steve Exp $" +#ident "$Id: Module.cc,v 1.14 2000/11/15 20:31:05 steve Exp $" #endif # include "Module.h" @@ -76,11 +76,12 @@ unsigned Module::port_count() const const svector& Module::get_port(unsigned idx) const { assert(idx < ports_.count()); + static svector zero; if (ports_[idx]) return ports_[idx]->expr; else - return svector(); + return zero; } unsigned Module::find_port(const string&name) const @@ -134,6 +135,9 @@ const list& Module::get_behaviors() const /* * $Log: Module.cc,v $ + * Revision 1.14 2000/11/15 20:31:05 steve + * Fix warning about temporaries. + * * Revision 1.13 2000/11/05 06:05:59 steve * Handle connectsion to internally unconnected modules (PR#38) *