diff options
author | Yifan Hong <elsk@google.com> | 2016-12-13 15:07:35 -0800 |
---|---|---|
committer | Yifan Hong <elsk@google.com> | 2016-12-16 12:32:30 -0800 |
commit | 33223ca2a9b8126d357e0986905fa35c0970a30e (patch) | |
tree | f2ec43d7227a61121ff28e42782d5502f8cb8948 /utils | |
parent | b094943d513962fe167837a8dd790c278aa4618a (diff) | |
download | hidl-33223ca2a9b8126d357e0986905fa35c0970a30e.tar.gz |
Rename indentBlock to indent.
No reason to add "block" to the name.
Test: compiles
Change-Id: I8a930cb8d9bb7d03d302c0b9c308ab6d40045260
Diffstat (limited to 'utils')
-rw-r--r-- | utils/Formatter.cpp | 6 | ||||
-rw-r--r-- | utils/include/hidl-util/Formatter.h | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/utils/Formatter.cpp b/utils/Formatter.cpp index 4aab8a5a..404c0c61 100644 --- a/utils/Formatter.cpp +++ b/utils/Formatter.cpp @@ -42,14 +42,14 @@ void Formatter::unindent(size_t level) { mIndentDepth -= level; } -void Formatter::indentBlock(size_t level, std::function<void(void)> func) { +void Formatter::indent(size_t level, std::function<void(void)> func) { this->indent(level); func(); this->unindent(level); } -void Formatter::indentBlock(std::function<void(void)> func) { - this->indentBlock(1, func); +void Formatter::indent(std::function<void(void)> func) { + this->indent(1, func); } void Formatter::setLinePrefix(const std::string &prefix) { diff --git a/utils/include/hidl-util/Formatter.h b/utils/include/hidl-util/Formatter.h index 1e7e03b9..6264159e 100644 --- a/utils/include/hidl-util/Formatter.h +++ b/utils/include/hidl-util/Formatter.h @@ -32,14 +32,14 @@ struct Formatter { void indent(size_t level = 1); void unindent(size_t level = 1); - // out.indentBlock(2, [&] { + // out.indent(2, [&] { // out << "Meow\n"; // }); - void indentBlock(size_t level, std::function<void(void)> func); - // out.indentBlock([&] { + void indent(size_t level, std::function<void(void)> func); + // out.indent([&] { // out << "Meow\n"; // }); - void indentBlock(std::function<void(void)> func); + void indent(std::function<void(void)> func); Formatter &operator<<(const std::string &out); Formatter &operator<<(size_t n); |