projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f671c99
)
printattrs: Simplify `get_indent_str()`.
author
Alberto Gonzalez
<boqwxp@airmail.cc>
Thu, 28 May 2020 05:30:00 +0000
(
05:30
+0000)
committer
Alberto Gonzalez
<boqwxp@airmail.cc>
Thu, 28 May 2020 05:34:28 +0000
(
05:34
+0000)
Co-Authored-By: Xiretza <xiretza@xiretza.xyz>
passes/cmds/printattrs.cc
patch
|
blob
|
history
diff --git
a/passes/cmds/printattrs.cc
b/passes/cmds/printattrs.cc
index d4d57fd858e7eb193db3e5d18bad1d1f0285648d..80dbfa2591549c1009c30641019bd7f5bf5b73ab 100644
(file)
--- a/
passes/cmds/printattrs.cc
+++ b/
passes/cmds/printattrs.cc
@@
-36,9
+36,7
@@
struct PrintAttrsPass : public Pass {
}
static std::string get_indent_str(const unsigned int indent) {
- //Build the format string (e.g. "%4s")
- std::string format_str = stringf("%%%ds", indent);
- return stringf(format_str.c_str(), " "); //Use the format string with " " as %s
+ return stringf("%*s", indent, "");
}
static void log_const(const RTLIL::IdString &s, const RTLIL::Const &x, const unsigned int indent) {