mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-24 06:32:06 +08:00
Fix warning about enum usage
This commit is contained in:
parent
c97983a91c
commit
dccb766095
@ -45,12 +45,12 @@ public:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (padinfo_.side_ == padding_info::left)
|
if (padinfo_.side_ == padding_info::pad_side::left)
|
||||||
{
|
{
|
||||||
pad_it(remaining_pad_);
|
pad_it(remaining_pad_);
|
||||||
remaining_pad_ = 0;
|
remaining_pad_ = 0;
|
||||||
}
|
}
|
||||||
else if (padinfo_.side_ == padding_info::center)
|
else if (padinfo_.side_ == padding_info::pad_side::center)
|
||||||
{
|
{
|
||||||
auto half_pad = remaining_pad_ / 2;
|
auto half_pad = remaining_pad_ / 2;
|
||||||
auto reminder = remaining_pad_ & 1;
|
auto reminder = remaining_pad_ & 1;
|
||||||
@ -1285,15 +1285,15 @@ SPDLOG_INLINE details::padding_info pattern_formatter::handle_padspec_(std::stri
|
|||||||
switch (*it)
|
switch (*it)
|
||||||
{
|
{
|
||||||
case '-':
|
case '-':
|
||||||
side = padding_info::right;
|
side = padding_info::pad_side::right;
|
||||||
++it;
|
++it;
|
||||||
break;
|
break;
|
||||||
case '=':
|
case '=':
|
||||||
side = padding_info::center;
|
side = padding_info::pad_side::center;
|
||||||
++it;
|
++it;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
side = details::padding_info::left;
|
side = details::padding_info::pad_side::left;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ namespace details {
|
|||||||
// padding information.
|
// padding information.
|
||||||
struct padding_info
|
struct padding_info
|
||||||
{
|
{
|
||||||
enum pad_side
|
enum class pad_side
|
||||||
{
|
{
|
||||||
left,
|
left,
|
||||||
right,
|
right,
|
||||||
@ -42,7 +42,7 @@ struct padding_info
|
|||||||
return enabled_;
|
return enabled_;
|
||||||
}
|
}
|
||||||
size_t width_ = 0;
|
size_t width_ = 0;
|
||||||
pad_side side_ = left;
|
pad_side side_ = pad_side::left;
|
||||||
bool truncate_ = false;
|
bool truncate_ = false;
|
||||||
bool enabled_ = false;
|
bool enabled_ = false;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user