diff options
Diffstat (limited to 'tools/aapt2/Flags.cpp')
-rw-r--r-- | tools/aapt2/Flags.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/aapt2/Flags.cpp b/tools/aapt2/Flags.cpp index 9435396991df..666e8a8efff1 100644 --- a/tools/aapt2/Flags.cpp +++ b/tools/aapt2/Flags.cpp @@ -81,6 +81,8 @@ Flags& Flags::optionalSwitch(const StringPiece& name, const StringPiece& descrip } void Flags::usage(const StringPiece& command, std::ostream* out) { + constexpr size_t kWidth = 50; + *out << command << " [options]"; for (const Flag& flag : mFlags) { if (flag.required) { @@ -100,11 +102,11 @@ void Flags::usage(const StringPiece& command, std::ostream* out) { // the first line) followed by the description line. This will make sure that multiline // descriptions are still right justified and aligned. for (StringPiece line : util::tokenize<char>(flag.description, '\n')) { - *out << " " << std::setw(30) << std::left << argLine << line << "\n"; + *out << " " << std::setw(kWidth) << std::left << argLine << line << "\n"; argLine = " "; } } - *out << " " << std::setw(30) << std::left << "-h" << "Displays this help menu\n"; + *out << " " << std::setw(kWidth) << std::left << "-h" << "Displays this help menu\n"; out->flush(); } |