mirror of
https://github.com/gabime/spdlog.git
synced 2025-10-02 11:29:01 +08:00
Added truncate flag (issue #1297)
This commit is contained in:
@@ -29,17 +29,21 @@ struct padding_info
|
||||
};
|
||||
|
||||
padding_info() = default;
|
||||
padding_info(size_t width, padding_info::pad_side side)
|
||||
padding_info(size_t width, padding_info::pad_side side, bool truncate)
|
||||
: width_(width)
|
||||
, side_(side)
|
||||
, truncate_(truncate)
|
||||
, enabled_(true)
|
||||
{}
|
||||
|
||||
bool enabled() const
|
||||
{
|
||||
return width_ != 0;
|
||||
return enabled_;
|
||||
}
|
||||
const size_t width_ = 0;
|
||||
const pad_side side_ = left;
|
||||
bool truncate_ = false;
|
||||
bool enabled_ = false;
|
||||
};
|
||||
|
||||
class flag_formatter
|
||||
|
Reference in New Issue
Block a user