Suppress bogus coverity warnings
This commit is contained in:
@@ -444,19 +444,20 @@ class BasicArgFormatter : public ArgVisitor<Impl, void> {
|
||||
typedef typename BasicWriter<Char>::CharPtr CharPtr;
|
||||
Char fill = internal::CharTraits<Char>::cast(spec_.fill());
|
||||
CharPtr out = CharPtr();
|
||||
enum { CHAR_WIDTH = 1 };
|
||||
const int CHAR_WIDTH = 1;
|
||||
if (spec_.width_ > CHAR_WIDTH) {
|
||||
out = writer_.grow_buffer(spec_.width_);
|
||||
if (spec_.align_ == ALIGN_RIGHT) {
|
||||
std::fill_n(out, spec_.width_ - CHAR_WIDTH, fill);
|
||||
out += spec_.width_ - CHAR_WIDTH;
|
||||
} else if (spec_.align_ == ALIGN_CENTER) {
|
||||
out = writer_.fill_padding(out, spec_.width_, CHAR_WIDTH, fill);
|
||||
out = writer_.fill_padding(out, spec_.width_,
|
||||
internal::check(CHAR_WIDTH), fill);
|
||||
} else {
|
||||
std::fill_n(out + CHAR_WIDTH, spec_.width_ - CHAR_WIDTH, fill);
|
||||
}
|
||||
} else {
|
||||
out = writer_.grow_buffer(1);
|
||||
out = writer_.grow_buffer(CHAR_WIDTH);
|
||||
}
|
||||
*out = internal::CharTraits<Char>::cast(value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user