diff options
author | Alberto Gonzalez <boqwxp@airmail.cc> | 2020-05-28 05:30:00 +0000 |
---|---|---|
committer | Alberto Gonzalez <boqwxp@airmail.cc> | 2020-05-28 05:34:28 +0000 |
commit | 5896ffd56f8d0653c9f7a71f18570d093fe669e8 (patch) | |
tree | 04bda4065554b0b3df18bb84e1fe4fcf98b89514 /passes/cmds | |
parent | f671c99cb89820c7a26035f51c1a6cb62e73280c (diff) | |
download | yosys-5896ffd56f8d0653c9f7a71f18570d093fe669e8.tar.gz yosys-5896ffd56f8d0653c9f7a71f18570d093fe669e8.tar.bz2 yosys-5896ffd56f8d0653c9f7a71f18570d093fe669e8.zip |
printattrs: Simplify `get_indent_str()`.
Co-Authored-By: Xiretza <xiretza@xiretza.xyz>
Diffstat (limited to 'passes/cmds')
-rw-r--r-- | passes/cmds/printattrs.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/passes/cmds/printattrs.cc b/passes/cmds/printattrs.cc index d4d57fd85..80dbfa259 100644 --- 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) { |