From aca2c51e9633b47d67f0bec40276830f030ee1e3 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Sun, 7 Feb 2021 17:33:53 -0700 Subject: [PATCH] minor cleanup --- CMakeLists.txt | 4 ++-- liberty/LibertyBuilder.cc | 8 ++++---- liberty/LibertyBuilder.hh | 6 +++--- liberty/LibertyParser.cc | 9 ++------- 4 files changed, 11 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 773dc103..af438059 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -237,8 +237,8 @@ set(STA_TCL_FILES # ################################################################ -# Earlier versions of flex use 'register' declarations are deprecated in c++11 -# and illegal in c++17. +# Earlier versions of flex use 'register' declarations that are deprecated +# in c++11 and illegal in c++17. #find_package(FLEX 2.6.4) find_package(FLEX) find_package(BISON) diff --git a/liberty/LibertyBuilder.cc b/liberty/LibertyBuilder.cc index 9cea6a63..ae4d606c 100644 --- a/liberty/LibertyBuilder.cc +++ b/liberty/LibertyBuilder.cc @@ -89,18 +89,18 @@ LibertyBuilder::makeBusPortBit(ConcreteLibrary *library, library->busBrktLeft(), bit_index, library->busBrktRight()); - ConcretePort *port = makePort(cell, bit_name, bit_index); + LibertyPort *port = makePort(cell, bit_name, bit_index); bus_port->addPortBit(port); cell->addPortBit(port); } -ConcretePort * +LibertyPort * LibertyBuilder::makePort(LibertyCell *cell, const char *bit_name, int bit_index) { - ConcretePort *port = new LibertyPort(cell, bit_name, false, - bit_index, bit_index, false, nullptr); + LibertyPort *port = new LibertyPort(cell, bit_name, false, + bit_index, bit_index, false, nullptr); return port; } diff --git a/liberty/LibertyBuilder.hh b/liberty/LibertyBuilder.hh index d0bd3f8f..a7b04fad 100644 --- a/liberty/LibertyBuilder.hh +++ b/liberty/LibertyBuilder.hh @@ -72,9 +72,9 @@ protected: int from_index, int to_index); // Bus port bit (internal to makeBusPortBits). - virtual ConcretePort *makePort(LibertyCell *cell, - const char *bit_name, - int bit_index); + virtual LibertyPort *makePort(LibertyCell *cell, + const char *bit_name, + int bit_index); void makeBusPortBit(ConcreteLibrary *library, LibertyCell *cell, ConcretePort *bus_port, diff --git a/liberty/LibertyParser.cc b/liberty/LibertyParser.cc index c54535f7..715fcda8 100644 --- a/liberty/LibertyParser.cc +++ b/liberty/LibertyParser.cc @@ -522,13 +522,8 @@ libertyIncludeBegin(const char *filename) liberty_filename = filename; liberty_line = 1; } - else { - // Copy the filename to the stack so it is deleted when - // libertyParseError throws an error. - string filename1(filename); - stringDelete(filename); - libertyParseError("cannot open include file %s.", filename1.c_str()); - } + else + libertyParseError("cannot open include file %s.", filename); return stream; }