the MinPad argument to PadToColumn only really makes sense to be 1,

just remove the argument and replace it with 1.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79246 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2009-08-17 15:48:08 +00:00
parent f547a12121
commit 8f4b1ec02b
7 changed files with 59 additions and 61 deletions
+3 -4
View File
@@ -51,21 +51,20 @@ void formatted_raw_ostream::ComputeColumn() {
/// \param MinPad - The minimum space to give after the most recent
/// I/O, even if the current column + minpad > newcol.
///
void formatted_raw_ostream::PadToColumn(unsigned NewCol, unsigned MinPad) {
void formatted_raw_ostream::PadToColumn(unsigned NewCol) {
// Figure out what's in the buffer and add it to the column count.
ComputeColumn();
// Output spaces until we reach the desired column.
unsigned num = NewCol - ColumnScanned;
if (NewCol < ColumnScanned || num < MinPad)
num = MinPad;
if (NewCol < ColumnScanned || num < 1)
num = 1;
// Keep a buffer of spaces handy to speed up processing.
const char *Spaces = " "
" ";
assert(num < MAX_COLUMN_PAD && "Unexpectedly large column padding");
write(Spaces, num);
}