Use & for StdStringSeq args
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
0c36caa182
commit
a1797918da
|
|
@ -125,7 +125,7 @@ public:
|
|||
void setThreadCount(int thread_count);
|
||||
|
||||
// define_corners compatibility.
|
||||
void makeScenes(StdStringSeq *scene_names);
|
||||
void makeScenes(const StdStringSeq &scene_names);
|
||||
void makeScene(const std::string &name,
|
||||
const std::string &mode_name,
|
||||
const StdStringSeq &liberty_min_files,
|
||||
|
|
@ -975,7 +975,7 @@ public:
|
|||
bool clk_gating_setup,
|
||||
bool clk_gating_hold);
|
||||
void setReportPathFormat(ReportPathFormat format);
|
||||
void setReportPathFieldOrder(StdStringSeq *field_names);
|
||||
void setReportPathFieldOrder(const StdStringSeq &field_names);
|
||||
void setReportPathFields(bool report_input_pin,
|
||||
bool report_hier_pins,
|
||||
bool report_net,
|
||||
|
|
|
|||
|
|
@ -211,14 +211,14 @@ ReportPath::findField(const char *name) const
|
|||
}
|
||||
|
||||
void
|
||||
ReportPath::setReportFieldOrder(StdStringSeq *field_names)
|
||||
ReportPath::setReportFieldOrder(const StdStringSeq &field_names)
|
||||
{
|
||||
// Disable all fields.
|
||||
for (ReportField *field : fields_)
|
||||
field->setEnabled(false);
|
||||
|
||||
ReportFieldSeq next_fields;
|
||||
for (const std::string &field_name : *field_names) {
|
||||
for (const std::string &field_name : field_names) {
|
||||
ReportField *field = findField(field_name.c_str());
|
||||
if (field) {
|
||||
next_fields.push_back(field);
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public:
|
|||
virtual ~ReportPath();
|
||||
ReportPathFormat pathFormat() const { return format_; }
|
||||
void setPathFormat(ReportPathFormat format);
|
||||
void setReportFieldOrder(StdStringSeq *field_names);
|
||||
void setReportFieldOrder(const StdStringSeq &field_names);
|
||||
void setReportFields(bool report_input_pin,
|
||||
bool report_hier_pins,
|
||||
bool report_net,
|
||||
|
|
|
|||
|
|
@ -395,10 +395,9 @@ set_report_path_format(ReportPathFormat format)
|
|||
}
|
||||
|
||||
void
|
||||
set_report_path_field_order(StdStringSeq *field_names)
|
||||
set_report_path_field_order(const StdStringSeq &field_names)
|
||||
{
|
||||
Sta::sta()->setReportPathFieldOrder(field_names);
|
||||
delete field_names;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -753,11 +752,10 @@ define_scene_cmd(const char *name,
|
|||
}
|
||||
|
||||
void
|
||||
define_scenes_cmd(StdStringSeq *scene_names)
|
||||
define_scenes_cmd(const StdStringSeq &scene_names)
|
||||
{
|
||||
Sta *sta = Sta::sta();
|
||||
sta->makeScenes(scene_names);
|
||||
delete scene_names;
|
||||
}
|
||||
|
||||
Scene *
|
||||
|
|
|
|||
|
|
@ -2468,9 +2468,9 @@ Sta::makeDefaultScene()
|
|||
|
||||
// define_corners (before read_liberty).
|
||||
void
|
||||
Sta::makeScenes(StdStringSeq *scene_names)
|
||||
Sta::makeScenes(const StdStringSeq &scene_names)
|
||||
{
|
||||
if (scene_names->size() > scene_count_max)
|
||||
if (scene_names.size() > scene_count_max)
|
||||
report_->error(1553, "maximum scene count exceeded");
|
||||
Parasitics *parasitics = findParasitics("default");
|
||||
Mode *mode = modes_[0];
|
||||
|
|
@ -2478,7 +2478,7 @@ Sta::makeScenes(StdStringSeq *scene_names)
|
|||
mode->clear();
|
||||
|
||||
deleteScenes();
|
||||
for (const std::string &name : *scene_names)
|
||||
for (const std::string &name : scene_names)
|
||||
makeScene(name, mode, parasitics);
|
||||
|
||||
cmd_scene_ = scenes_[0];
|
||||
|
|
@ -2729,7 +2729,7 @@ Sta::setReportPathFormat(ReportPathFormat format)
|
|||
}
|
||||
|
||||
void
|
||||
Sta::setReportPathFieldOrder(StdStringSeq *field_names)
|
||||
Sta::setReportPathFieldOrder(const StdStringSeq &field_names)
|
||||
{
|
||||
report_path_->setReportFieldOrder(field_names);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@
|
|||
namespace sta {
|
||||
|
||||
typedef MinMaxAll MinMaxAllNull;
|
||||
typedef std::vector<std::string> StdStringSeq;
|
||||
|
||||
#if TCL_MAJOR_VERSION < 9
|
||||
typedef int Tcl_Size;
|
||||
|
|
@ -304,6 +303,11 @@ using namespace sta;
|
|||
$1 = tclListSeqStdString($input, interp);
|
||||
}
|
||||
|
||||
%typemap(in) const StdStringSeq & (StdStringSeq seq) {
|
||||
seq = tclListSeqStdString($input, interp);
|
||||
$1 = &seq;
|
||||
}
|
||||
|
||||
%typemap(in) StdStringSeq* {
|
||||
$1 = tclListSeqStdStringPtr($input, interp);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue